1 #include "studiox_includes.h"
2 
3 #ifdef _DEBUG
4 #define new DEBUG_NEW
5 #endif
6 
7 extern CFont AsteriskFont;
8 extern CFont MediumFont;
9 extern CFont ViewHeaderFont;
10 
11 struct FontResizeParam {
12     CFont *font;
13     int text_scaler;
14     int new_text_scaler;
15 };
16 
17 // express_dialog
BEGIN_MESSAGE_MAP(express_dialog,CDialog)18 BEGIN_MESSAGE_MAP(express_dialog, CDialog)
19  ON_WM_CREATE()
20  ON_WM_NCHITTEST()
21  ON_WM_SIZE()
22  ON_WM_ERASEBKGND()
23  ON_BN_CLICKED(IDCANCEL, OnCancel)
24  ON_WM_CLOSE()
25  ON_WM_SETTINGCHANGE()
26 END_MESSAGE_MAP()
27 
28 ///////////////////////////////////////////////////////////////////////////////
29 express_dialog::express_dialog(int width, int height)
30 	: CDialog()
31 {
32     m_width = width;
33     m_height = height;
34     IconId = 0;
35     mSavedMsg = L"";
36     m_text_scaler = DEFAULT_TEXT_SCALER;
37 }
38 
39 ///////////////////////////////////////////////////////////////////////////////
express_dialog(int template_id,CWnd * parent)40 express_dialog::express_dialog(int template_id, CWnd *parent)
41 	: CDialog(template_id, parent)
42 {
43     m_template_id = template_id;
44     m_width = m_height = -1;
45     IconId = 0;
46     mSavedMsg = L"";
47     m_text_scaler = DEFAULT_TEXT_SCALER;
48 }
49 
50 ///////////////////////////////////////////////////////////////////////////////
~express_dialog()51 express_dialog::~express_dialog()
52 {
53 }
54 
55 ///////////////////////////////////////////////////////////////////////////////
OnCreate(LPCREATESTRUCT lpCreateStruct)56 int express_dialog::OnCreate(LPCREATESTRUCT lpCreateStruct)
57 {
58 //    lpCreateStruct->dwExStyle |= WS_EX_APPWINDOW;
59 
60     CDialog::OnCreate(lpCreateStruct);
61 
62     CRect client;
63     CRect size;
64     GetWindowRect(&size);
65 
66     if (m_width > 0)
67     {
68         size.right = size.left + m_width;
69         size.bottom = size.top + m_height;
70         MoveWindow(size);
71     }
72     GetClientRect(&client);
73 
74     SetControlSize();
75 
76     int dpi = GetSystemDPI();
77     int offset = MulDiv((TITLE_BAR_HEIGHT - CLOSE_BUTTON_HEIGHT - 3) >> 1, dpi, DEFAULT_DPI_96);
78 
79     size = client;
80     size.top += offset;
81     size.right -= offset;
82     size.left = size.right - m_close_button_width;
83     size.bottom = size.top + m_title_bar_height;
84     close_button.Create(NULL, WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON|BS_OWNERDRAW, size, this, IDCANCEL);
85     close_button.LoadBitmaps(IDB_BTN_CLOSE_NORMAL, IDB_BTN_CLOSE_PRESSED);
86     SetControlAccessibleName(close_button.GetSafeHwnd(), _T("Close"));
87 
88     if (mTitleText)
89     {
90         SetWindowText(mTitleText);
91     }
92     return 0;
93 }
94 
95 
96 ///////////////////////////////////////////////////////////////////////////////
SetTitleText(CString & title)97 void express_dialog::SetTitleText(CString &title)
98 {
99     mTitleText = title;
100     //SetWindowText(mTitleText);
101     //SetWindowText(CString(_T("testing")));
102 }
103 
104 ///////////////////////////////////////////////////////////////////////////////
SetTitleText(char * text)105 void express_dialog::SetTitleText(char *text)
106 {
107     SetTitleText(CString(text));
108 }
109 
110 ///////////////////////////////////////////////////////////////////////////////
SetControlSize()111 void express_dialog::SetControlSize()
112 {
113     int dpi = GetSystemDPI();
114     int text_scaler = GetTextScaler();
115 
116     m_close_button_width = MulDiv(CLOSE_BUTTON_WIDTH, dpi, DEFAULT_DPI_96);
117     m_close_button_height = MulDiv(CLOSE_BUTTON_HEIGHT, dpi, DEFAULT_DPI_96);
118     m_title_bar_height = GetScaledValue(TITLE_BAR_HEIGHT, dpi, text_scaler);
119     m_status_bar_height = GetScaledValue(STATUS_BAR_HEIGHT, dpi, text_scaler);
120     m_save_button_width = GetScaledValue(SAVE_BUTTON_WIDTH, dpi, text_scaler);
121     m_save_button_height = GetScaledValue(SAVE_BUTTON_HEIGHT, dpi, text_scaler);
122     m_cancel_button_width = GetScaledValue(CANCEL_BUTTON_WIDTH, dpi, text_scaler);
123     m_cancel_button_height = GetScaledValue(CANCEL_BUTTON_HEIGHT, dpi, text_scaler);
124 }
125 
126 ///////////////////////////////////////////////////////////////////////////////
AddSaveButton(CString title)127 void express_dialog::AddSaveButton(CString title)
128 {
129     CRect client;
130     CRect size;
131 
132     GetClientRect(&client);
133 
134     size.bottom = client.bottom - 4;
135     size.top = size.bottom - m_save_button_height;
136     size.right = client.right - 4;
137     size.left = size.right - m_save_button_width;
138 
139     save_button.Create(title, WS_CHILD | WS_VISIBLE | WS_TABSTOP| BS_DEFPUSHBUTTON | BS_OWNERDRAW | MAX_TAB_STOPS, size, this, IDOK);
140     save_button.LoadBitmaps(IDB_OK_BUTTON_NORMAL, IDB_OK_BUTTON_PRESSED);
141     save_button.SetWindowText(title);
142     save_button.SetFont(&MediumFont);
143     mSavedMsg = L"Saved";
144 }
145 
146 ///////////////////////////////////////////////////////////////////////////////
AddCancelButton(CString title)147 void express_dialog::AddCancelButton(CString title)
148 {
149     CRect client;
150     CRect size;
151 
152     GetClientRect(&client);
153 
154     size.bottom = client.bottom - 4 - (m_save_button_height - m_cancel_button_height) / 2;
155     size.top = size.bottom - m_cancel_button_height;
156     size.left = client.left + 4;
157     size.right = size.left + m_cancel_button_width;
158 
159     cancel_button.Create(title, BS_PUSHBUTTON | BS_CENTER | WS_TABSTOP | BS_VCENTER | WS_CHILD | WS_VISIBLE, size, this, IDCANCEL);
160     cancel_button.SetFont(&MediumFont);
161 }
162 
163 ///////////////////////////////////////////////////////////////////////////////
PaintRequiredAsterisk(int control_id)164 void express_dialog::PaintRequiredAsterisk(int control_id)
165 {
166     // Pick target control that need a required asterisk mark.
167     CWnd* control = GetDlgItem(control_id);
168 
169     if (!control)
170     {
171         return;
172     }
173 
174     CRect controlbox;
175     int xpos, ypos;
176     SIZE sz;
177 
178     CDC* dc = GetDC();
179     dc->SetTextColor(COLORREF(0x2020ff));
180     dc->SetBkMode(TRANSPARENT);
181     CFont* old_font = dc->SelectObject(&AsteriskFont);
182 
183     // Get asterisk text size.
184     GetTextExtentPoint32(dc->GetSafeHdc(), _T("*"), 1, &sz);
185 
186     // Get control size.
187     control->GetWindowRect(&controlbox);
188     ScreenToClient(&controlbox);
189 
190     // Calculate asterisk draw position.
191     xpos = controlbox.left - (sz.cx * 3 / 2);
192     ypos = controlbox.top;
193 
194     // Draw asterisk.
195     TextOut(dc->GetSafeHdc(), xpos, ypos, _T("*"), 1);
196 
197     dc->SelectObject(old_font);
198 
199     ReleaseDC(dc);
200 }
201 
202 ///////////////////////////////////////////////////////////////////////////////
PaintTitleAndStatusBar(CDC * dc)203 void express_dialog::PaintTitleAndStatusBar(CDC *dc)
204 {
205     CRect size;
206     CRect title_rect;
207     CDC dcMemory;
208     CBitmap fillmap;
209     BITMAP bm;
210     int xpos;
211 
212     // fill the title bar:
213     fillmap.LoadBitmap(IDB_HEADER_BACKGROUND);
214     fillmap.GetObject(sizeof(BITMAP), &bm);
215 
216     dcMemory.CreateCompatibleDC(dc);
217     dcMemory.SelectObject(&fillmap);
218 
219     GetClientRect(&size);
220     xpos = size.left;
221 
222     while(xpos < size.right)
223     {
224         dc->StretchBlt(xpos, size.top, bm.bmWidth, m_title_bar_height, &dcMemory, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
225         xpos += bm.bmWidth;
226     }
227 
228     // draw the icon in top-left corner:
229     fillmap.DeleteObject();
230 
231     int vspace = 4;
232     int icon_width = 0;
233 
234     title_rect = size;
235     title_rect.bottom = title_rect.top + m_title_bar_height;
236     if (IconId)
237     {
238         fillmap.LoadBitmap(IconId);
239         fillmap.GetObject(sizeof(BITMAP), &bm);
240         dcMemory.SelectObject(fillmap);
241 
242         int dpi = GetSystemDPI();
243         icon_width = MulDiv(bm.bmWidth, dpi, DEFAULT_DPI_96);
244 
245         int vspace = ((m_title_bar_height - icon_width) >> 1);
246 
247         title_rect.left += 4;
248         dc->StretchBlt(title_rect.left, title_rect.top + vspace, icon_width, icon_width, &dcMemory, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
249     }
250 
251     if (!mTitleText.IsEmpty())
252     {
253         // draw the caption
254         dc->SetTextColor(RGB(240, 240, 240));
255         dc->SetBkMode(TRANSPARENT);
256         CFont *old_font = dc->SelectObject(&ViewHeaderFont);
257         title_rect.left += (icon_width + 4);
258         dc->DrawText(mTitleText, &title_rect, DT_LEFT | DT_SINGLELINE | DT_VCENTER);
259         dc->SelectObject(old_font);
260     }
261 
262     // fill the status bar:
263     fillmap.DeleteObject();
264     fillmap.LoadBitmap(IDB_STATUS_BAR_FILL);
265     fillmap.GetObject(sizeof(BITMAP), &bm);
266     dcMemory.SelectObject(&fillmap);
267 
268     xpos = size.left;
269     while(xpos < size.right)
270     {
271         dc->StretchBlt(xpos, size.bottom - m_status_bar_height, bm.bmWidth, m_status_bar_height, &dcMemory, 0, 0, bm.bmWidth, bm.bmHeight, SRCCOPY);
272         xpos += bm.bmWidth;
273     }
274 }
275 
OnNcHitTest(CPoint point)276 LRESULT express_dialog::OnNcHitTest(CPoint point)
277 {
278 
279     // TODO: Add your message handler code here and/or call default
280     CRect rect;
281 
282     GetClientRect(&rect);
283     ClientToScreen(&rect);
284 
285     rect.bottom = rect.top + m_title_bar_height;
286 
287     if (PtInRect(&rect, point))
288     {
289         return HTCAPTION;
290     }
291 
292     return CDialog::OnNcHitTest(point);
293 }
294 
OnSize(UINT nType,int cx,int cy)295 void express_dialog::OnSize(UINT nType, int cx, int cy)
296 {
297     CDialog::OnSize(nType, cx, cy);
298 
299     if (save_button)
300     {
301         CRect client;
302         CRect size;
303         GetClientRect(&client);
304 
305         size.bottom = client.bottom - 4;
306         size.top = size.bottom - m_save_button_height;
307         size.right = client.right - 4;
308         size.left = size.right - m_save_button_width;
309 
310         /* Position save button.  */
311         save_button.MoveWindow(&size);
312     }
313 
314     if (cancel_button)
315     {
316         CRect client;
317         CRect size;
318         GetClientRect(&client);
319 
320         size.bottom = client.bottom - 4 - (m_save_button_height - m_cancel_button_height) / 2;
321         size.top = size.bottom - m_cancel_button_height;
322         size.left = client.left + 4;
323         size.right = size.left + m_cancel_button_width;
324 
325         /* Position save button.  */
326         cancel_button.MoveWindow(&size);
327     }
328 
329     if (close_button)
330     {
331         CRect size;
332         GetClientRect(&size);
333 
334         size.top += 4;
335         size.right -= 4;
336         size.left = size.right - m_close_button_width;
337         size.bottom = size.top + m_close_button_height;
338 
339         /* Position close button.  */
340         close_button.MoveWindow(&size);
341     }
342 }
343 
OnEraseBkgnd(CDC * pDC)344 BOOL express_dialog::OnEraseBkgnd(CDC* pDC)
345 {
346     // TODO: Add your message handler code here and/or call default
347     CDialog::OnEraseBkgnd(pDC);
348 
349     PaintTitleAndStatusBar(pDC);
350 
351     return true;
352 }
353 
354 
355 ///////////////////////////////////////////////////////////////////////////////
PreTranslateMessage(MSG * pMsg)356 BOOL express_dialog::PreTranslateMessage(MSG* pMsg)
357 {
358     // TODO: Add your specialized code here and/or call the base class
359     if (pMsg->message == WM_KEYDOWN)
360     {
361         if (pMsg->wParam == VK_RETURN)
362         {
363             //block enter key from closing the dialog when save button do not have focus
364             CWnd* focus_owner = GetFocus();
365             TCHAR class_name[MAX_PATH];
366 
367             if (focus_owner == &close_button)
368             {
369                 // Enter key on close button generates IDOK.
370                 // Call OnCancel directly to end the dialog.
371                 OnCancel();
372                 return TRUE;
373             }
374 
375             GetClassName(focus_owner->GetSafeHwnd(), class_name, MAX_PATH - 1);
376 
377             //the enter key on push button equals to click event
378             //the enter key on combobox will show/hide combo list
379             //the enter key on multi line edit box will insert a new line character
380             //do not block enter key on push button, combobox and multi-line edit box
381 
382             if (_tcscmp(class_name, _T("Button")) == 0)
383             {
384                 UINT uStyle = ((CButton *)focus_owner)->GetButtonStyle();
385                 switch (uStyle & 0xf)
386                 {
387                 case BS_CHECKBOX:
388                 case BS_RADIOBUTTON:
389                 case BS_AUTOCHECKBOX:
390                 case BS_AUTORADIOBUTTON:
391                     return TRUE;
392                 }
393             }
394             else if ((_tcscmp(class_name, _T("Edit")) == 0) || _tcscmp(class_name, _T("RICHEDIT50W")) == 0)
395             {
396                 UINT uStyle = focus_owner->GetStyle();
397                 if (!(uStyle & ES_MULTILINE))
398                 {
399                     return TRUE;
400                 }
401             }
402             else
403             {
404                 if (_tcscmp(class_name, _T("ComboBox")) != 0)
405                 {
406                     return TRUE;
407                 }
408             }
409         }
410 
411     }
412 
413     return CDialog::PreTranslateMessage(pMsg);
414 }
415 
416 ////////////////////////////////////////////////////////////////////////////////////
417 ////////////////////////////////////////////////////////////////////////////////////
418 //
419 // CustomBitmapButton: A custom CBitmapButton that draws text over the button
420 //
421 ////////////////////////////////////////////////////////////////////////////////////
422 ////////////////////////////////////////////////////////////////////////////////////
423 //BEGIN_MESSAGE_MAP(custom_bitmap_button, CBitmapButton)
424 //    ON_WM_PAINT()
425 //END_MESSAGE_MAP()
426 
custom_bitmap_button()427 custom_bitmap_button::custom_bitmap_button() : CBitmapButton()
428 {
429 }
430 
DrawBitmap(LPDRAWITEMSTRUCT lpDIS)431 void custom_bitmap_button::DrawBitmap(LPDRAWITEMSTRUCT lpDIS)
432 {
433     ASSERT(lpDIS != NULL);
434     // must have at least the first bitmap loaded before calling DrawItem
435     ASSERT(m_bitmap.m_hObject != NULL);     // required
436 
437     // use the main bitmap for up, the selected bitmap for down
438     CBitmap* pBitmap = &m_bitmap;
439     UINT state = lpDIS->itemState;
440     if ((state & ODS_SELECTED) && m_bitmapSel.m_hObject != NULL)
441         pBitmap = &m_bitmapSel;
442     else if ((state & ODS_FOCUS) && m_bitmapFocus.m_hObject != NULL)
443         pBitmap = &m_bitmapFocus;   // third image for focused
444     else if ((state & ODS_DISABLED) && m_bitmapDisabled.m_hObject != NULL)
445         pBitmap = &m_bitmapDisabled;   // last image for disabled
446 
447     // draw the whole button
448     CDC* pDC = CDC::FromHandle(lpDIS->hDC);
449     CDC memDC;
450     memDC.CreateCompatibleDC(pDC);
451     CBitmap* pOld = memDC.SelectObject(pBitmap);
452     if (pOld == NULL)
453         return;     // destructors will clean up
454 
455     CRect rect;
456     rect.CopyRect(&lpDIS->rcItem);
457     // determine bitmaps size for use in StretchBlt
458     BITMAP bits;
459     pBitmap->GetObject(sizeof(BITMAP), &bits);
460     pDC->StretchBlt(rect.left, rect.top, rect.Width(), rect.Height(),
461         &memDC, 0, 0, bits.bmWidth, bits.bmHeight, SRCCOPY);
462     memDC.SelectObject(pOld);
463 }
464 
465 //void custom_bitmap_button::OnPaint()
DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)466 void custom_bitmap_button::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct)
467 {
468     CString title;
469     CDC *dc = GetDC();
470     CRect size;
471     GetClientRect(&size);
472     GetWindowText(title);
473     dc->SetBkMode(TRANSPARENT);
474 
475     HIGHCONTRAST info = { 0 };
476     info.cbSize = sizeof(HIGHCONTRAST);
477 
478     SystemParametersInfoW(SPI_GETHIGHCONTRAST, 0, &info, 0);
479 
480     if ((info.dwFlags & HCF_HIGHCONTRASTON) && (!title.IsEmpty()))
481     {
482         CBrush brush;
483         brush.CreateSolidBrush(GetSysColor(COLOR_BTNFACE));
484         dc->FillRect(&lpDrawItemStruct->rcItem, &brush);
485     }
486     else
487     {
488         DrawBitmap(lpDrawItemStruct);
489     }
490 
491     UINT state = lpDrawItemStruct->itemState;
492 
493     if ((state & ODS_FOCUS) || (state & ODS_SELECTED))
494     {
495         CRect rect = lpDrawItemStruct->rcItem;
496         CPen penBlue(PS_SOLID, 2, RGB_BUTTON_FOCUS);
497         CPen* pOldPen = dc->SelectObject(&penBlue);
498         CBrush *pOldBrush = (CBrush*)dc->SelectStockObject(NULL_BRUSH);
499 
500         rect.DeflateRect(1, 1, 0, 0);
501         dc->Rectangle(rect);
502         dc->SelectObject(pOldPen);
503         dc->SelectObject(pOldBrush);
504     }
505 
506     if (state & ODS_SELECTED)
507     {
508         size.left += 2;
509         size.top += 2;
510     }
511     CFont *old_font = dc->SelectObject(&MediumFont);
512     dc->SetTextColor(GetSysColor(COLOR_BTNTEXT));
513     dc->DrawText(title, &size, DT_CENTER|DT_SINGLELINE|DT_VCENTER);
514     dc->SelectObject(old_font);
515     ReleaseDC(dc);
516 }
517 
518 ///////////////////////////////////////////////////////////////////////////////
OnOK()519 void express_dialog::OnOK()
520 {
521     CMainFrame *pMain = (CMainFrame*)AfxGetApp()->GetMainWnd();
522 
523     if (pMain && (!mSavedMsg.IsEmpty()))
524     {
525         pMain->GetStatusMsgControl()->SetWindowText(mSavedMsg);
526         pMain->GetStatusMsgControl()->NotifyWinEvent(
527             EVENT_OBJECT_LIVEREGIONCHANGED,
528             OBJID_CLIENT,
529             CHILDID_SELF);
530     }
531 
532     CDialog::OnOK();
533 }
534 
535 ///////////////////////////////////////////////////////////////////////////////
DoModal()536 INT_PTR express_dialog::DoModal()
537 {
538     // TODO: Add your specialized code here and/or call the base class
539     CDialogTemplate dlt;
540 
541     if (!dlt.Load(MAKEINTRESOURCE(express_dialog::m_template_id)))
542     {
543         return -1;
544     }
545 
546     m_text_scaler = GetTextScaler();
547 
548     int point_size = DEFAULT_DLG_FONT_POINT_SIZE * m_text_scaler / DEFAULT_TEXT_SCALER;
549 
550     dlt.SetFont(L"MS Shell Dlg", point_size);
551     LPSTR pdata = (LPSTR)GlobalLock(dlt.m_hTemplate);
552     m_lpszTemplateName = NULL;
553     InitModalIndirect(pdata);
554     GlobalUnlock(dlt.m_hTemplate);
555 
556     return CDialog::DoModal();
557 }
558 
EnumChildProc(HWND hwnd,LPARAM lParam)559 BOOL CALLBACK EnumChildProc(HWND hwnd, LPARAM lParam)
560 {
561     CWnd *child = CWnd::FromHandle(hwnd);
562 
563     CRect rect;
564     child->GetWindowRect(&rect);
565 
566     CWnd *parent = child->GetParent();
567     parent->ScreenToClient(&rect);
568 
569     int ctl_id = child->GetDlgCtrlID();
570     FontResizeParam *param = (FontResizeParam*)lParam;
571 
572     switch (ctl_id)
573     {
574 
575     case IDCANCEL:
576         child->SetFont(param->font);
577         break;
578 
579     case IDCLOSE:
580     case IDOK:
581         break;
582 
583     case IDC_CREATE_PROJECT:
584         parent->GetClientRect(rect);
585         rect = recent_project_win::GetCreateNewProjectButtonSize(rect);
586         child->MoveWindow(&rect);
587         break;
588 
589     default:
590         child->SetFont(param->font);
591         rect.left = rect.left * param->new_text_scaler / param->text_scaler;
592         rect.right = rect.right * param->new_text_scaler / param->text_scaler;
593         rect.top = rect.top * param->new_text_scaler / param->text_scaler;
594         rect.bottom = rect.bottom * param->new_text_scaler / param->text_scaler;
595         child->MoveWindow(&rect);
596         break;
597     }
598 
599     return TRUE;
600 }
601 
602 ///////////////////////////////////////////////////////////////////////////////
CreateDialogFont(int text_scaler)603 void express_dialog::CreateDialogFont(int text_scaler)
604 {
605     m_dialog_font.DeleteObject();
606 
607     // Get number of pixels per logical inch along the screen height
608     int dpi = GetSystemDPI();
609 
610     int point_size = DEFAULT_DLG_FONT_POINT_SIZE * text_scaler / DEFAULT_TEXT_SCALER;
611 
612     // Convert point size to logic unit
613     int height = -MulDiv(point_size, dpi, 72);
614 
615     m_dialog_font.CreateFont(height, 0, 0, 0,
616         FW_NORMAL, FALSE, FALSE, 0,
617         ANSI_CHARSET,
618         OUT_TT_PRECIS,
619         CLIP_DEFAULT_PRECIS,
620         CLEARTYPE_QUALITY,
621         DEFAULT_PITCH | FF_SWISS, _T("Microsoft Sans Serif"));
622 }
623 
624 ///////////////////////////////////////////////////////////////////////////////
ChangeDialogFontSize()625 void express_dialog::ChangeDialogFontSize()
626 {
627     int new_text_scaler = GetTextScaler();
628 
629     if (new_text_scaler != m_text_scaler)
630     {
631         CreateDialogFont(new_text_scaler);
632 
633         SetControlSize();
634 
635         CRect rect;
636         GetWindowRect(&rect);
637         GetParent()->ScreenToClient(&rect);
638         int width = rect.Width() * new_text_scaler / m_text_scaler;
639         int height = rect.Height() * new_text_scaler / m_text_scaler;
640         rect.right = rect.left + width;
641         rect.bottom = rect.top + height;
642         MoveWindow(&rect);
643         FontResizeParam param = { &m_dialog_font, m_text_scaler, new_text_scaler };
644         EnumChildWindows(GetSafeHwnd(), EnumChildProc, (long)&param);
645         Invalidate();
646 
647         m_text_scaler = new_text_scaler;
648     }
649 }
650 
651 ///////////////////////////////////////////////////////////////////////////////
OnSettingChange(UINT uFlags,LPCTSTR lpszSection)652 void express_dialog::OnSettingChange(UINT uFlags, LPCTSTR lpszSection)
653 {
654     ChangeDialogFontSize();
655 
656     CDialog::OnSettingChange(uFlags, lpszSection);
657 }
658