Professional UI Solutions
Site Map   /  Register
 
 

Forum

Please Log In to post a new message or reply to an existing one. If you are not registered, please register.

NOTE: Some forums may be read-only if you are not currently subscribed to our technical support services.

Forums » Prof-UIS General Discussion » CExtComboBox arrow is too small Collapse All
Subject Author Date
Dmitri Doulepov May 26, 2004 - 1:08 AM

Arrow that opens list box of the combo box appears to be non-standard and too small. I use XP (small fonts). I think you use custom bitmap, right? Why not to use LoadBitmap(NULL, OBM_COMBO) and draw it transparently on the background painted by paint manager?

Technical Support May 26, 2004 - 3:24 AM

Dear Dmitri,

The down arrow size of the combo box is exactly the same as that used in the Microsoft Office applications. But you can change the default size yourself. In the CExtPaintManager::PaintComboFrame(...) method find the following lines:

CFont font;
int ppi = dc.GetDeviceCaps(LOGPIXELSX);
int pointsize = MulDiv(60, 96, ppi); // 6 points at 96 ppi
font.CreatePointFont(pointsize, _T("Marlett"));
By default, the down arrow corresponds to character code 54 in the Marlett font table (the "6" symbol in some other fonts) and the font size equals to 6 points. If you want to use a larger arrow, just increase the default size:
int pointsize = MulDiv(100, 96, ppi); // 10 points at 96 ppi
The final step is to apply the changes made in the PaintComboFrame method to all paint managers (CExtPaintManager, CExtPaintManagerXP, and CExtPaintManagerOffice2003).

Dmitri Doulepov May 28, 2004 - 7:49 AM

Wow, thanks! Does this font present on Windows 98?

Technical Support Jun 1, 2004 - 5:36 AM

Dear Dmitri,

The Marlett font is used by Windows for displaying scroll bar arrows, Maximize and Minimize buttons, option buttons, check boxes, and other controls. So, it is the system font, which is available in all versions of Windows.