Reputation: 93
In my application there is CMFCStatusBar. I add icon to this bar as follow:
m_wndStatusBar.SetPaneIcon(m_wndStatusBar.CommandToIndex(ID_INDICATOR_ZOOM),GetApp()->LoadIcon(IDR_ZOOM));
Size of this icon is 16x16 px. After adding this icon, the height of this bar is changed to 32px. Do you know, what I can do to avoid this effect?
Upvotes: 2
Views: 356
Reputation: 37152
Use LoadImage
instead of LoadIcon
and specify the desired icon size directly, e.g.:
::LoadImage(hInstance, MAKEINTRESOURCE(IDR_ZOOM), IMAGE_ICON, 16, 16, LR_SHARED);
Upvotes: 2