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.
Subject |
Author |
Date |
|
Simon DESEE
|
Dec 10, 2006 - 11:37 AM
|
Hi,
How can I change the bitmap size of my toolbar’s buttons dynamically ?
I’ve already included all bitmaps needed (16x16 and 32x32) on my project.
And how can I resize all other controls (combobox, ...) placed on the toolbar to fit the new size of the buttons ?
Thanks
|
|
Technical Support
|
Dec 11, 2006 - 12:35 PM
|
There is a bReplaceOld parameter in the CExtCmdManager::UpdateFromToolBar() method, which updates the command manager with toolbar commands and their images. If bReplaceOld is set to true all the information about the commands, including their bitmaps, is completely updated: VERIFY(
g_CmdManager->UpdateFromToolBar(
pApp->m_pszProfileName,
IDR_MAINFRAME,
NULL,
NULL,
true
)
); Do not forget to invoke the CFrameWnd::RecalcLayout() and CExtControlBar::stat_RedrawFloatingFrames methods after replacing toolbar bitmaps.
|
|