- Issue 1
In the standard property page, the bottom part of the dialog box is truncated (refer to the following screen shot for this issue).
- Issue 2
In the custom property page, the bottom part of the dialog box (the options of "Lum:" label and "Blue:" label) is truncated (refer to the following screen shot for this issue).
By default, the system font is set to a default UI font for each language version of Windows (for example, the Meiryo UI font family for Japanese language-based Windows). If there is a property sheet that uses the CpropertySheet class dialog in an MFC application in an environment that does not have a specific font set, the CMFCColorDialog color dialog box may be displayed with a different UI. This is because the CMFCColorPropertySheet class inherits from the CpropertySheet, and CMFCColorPropertySheet is used by the CMFCColorDialog class in order to provide a tabbed dialog box.
- Create a derived class from the CMFCColorDialog class.
- Override the OnInitDialog method.
- Obtain the size of CMFCColorDialog and tab in the OnInitDialog function, and extend the MFC color dialog box as necessary as in the following example:
int nExtraHeight = 40;
// specify other value here.
SetWindowPos(NULL, -1, -1, rectWindow.Width(), rectWindow.Height() + nExtraHeight, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
CWnd* pPropSheet = (CWnd*)m_pPropSheet;
pPropSheet->SetWindowPos(NULL, -1, -1, rectTab.Width(), rectTab.Height() + nExtraHeight, SWP_NOMOVE | SWP_NOZORDER | SWP_NOACTIVATE);
Article ID: 2925163 - Last Review: 26 Jan 2014 - Revision: 1