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 Tech Support » The Icon and Text Style of CExtDynamicControlBar's Gripper Collapse All
Subject Author Date
Chun Pong Lau Oct 6, 2006 - 10:56 AM

Hello dear support team,

Thanks for your CExtDynamicControlBar, which is very useful and beautiful. Here are something I would like to do with it in advance.

1) Can I add an icon, 16 x 16 or 32 x 32 to the left side of the gripper (caption) of the CExtDynamicControlBar?

2) Can I change the text style of the caption text, e.g. bold, font-family, text-size, etc?

Thank you in advance,
Alan

Technical Support Oct 7, 2006 - 12:47 PM

The size and look of the resizable control bar’s caption are determined by the paint manager. To change the font, you should repaint the caption by overriding the CExtControlBar::DoPaintNC() virtual method.

It is possible to embed an icon into the caption of the control bar but this task is tricky. Each button in the bar’s caption is an instance of the CExtBarNcAreaButton class or a class derived from it. The buttons can be both on the left and on the right side of the caption. You can code a button which ignores mouse clicks and draws an icon. The CMyResizableControlBarInFixedMode class in the FixedSizePanels application may be used as an example (see part of its code which relates to custom buttons in bar’s caption). The CMyResizableControlBarInFixedMode::OnNcAreaButtonsReinitialize() virtual method initializes two custom buttons implemented in the CNcBackForvardNavihationBtn class. These buttons are located on the left side of the caption exactly where you want the icon.