void CResizableDialog::OnSize(UINT nType, int cx, int cy) { CWnd::OnSize(nType, cx, cy); if (nType == SIZE_MAXHIDE || nType == SIZE_MAXSHOW) return; // arrangement not needed if ((m_bShowGrip)||(!IsDwmCompositionEnabled())) { if (nType == SIZE_MAXIMIZED) HideSizeGrip(&m_dwGripTempState); else ShowSizeGrip(&m_dwGripTempState); // update grip and layout UpdateSizeGrip(); } if (IsDwmCompositionEnabled()) HideGrip(); ArrangeLayout(); // on Vista, the redrawing doesn't work right, so we have to work // around this by invalidating the whole dialog so the DWM recognizes // that it has to update the application window. Invalidate(); }
BOOL CFilePatchesDlg::OnInitDialog() { CResizableStandAloneDialog::OnInitDialog(); // hide the grip since it would overlap with the "path all" button #if 0 HideGrip(); #endif HFONT hFont = (HFONT)m_cFileList.SendMessage(WM_GETFONT); LOGFONT lf = {0}; GetObject(hFont, sizeof(LOGFONT), &lf); lf.lfWeight = FW_BOLD; m_boldFont = CreateFontIndirect(&lf); AddAnchor(IDC_FILELIST, TOP_LEFT, BOTTOM_RIGHT); AddAnchor(IDC_PATCHSELECTEDBUTTON, BOTTOM_LEFT, BOTTOM_RIGHT); AddAnchor(IDC_PATCHALLBUTTON, BOTTOM_LEFT, BOTTOM_RIGHT); return TRUE; }