添加图标时CMFCStatusBar改变高度 [英] CMFCStatusBar change height when the icon is added
本文介绍了添加图标时CMFCStatusBar改变高度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
在我的应用程序中有 CMFCStatusBar.我将图标添加到此栏,如下所示:
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));
此图标的大小为 16x16 像素.添加此图标后,此栏的高度更改为32px.你知道我能做些什么来避免这种影响吗?
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?
推荐答案
使用 LoadImage
而不是 LoadIcon
并直接指定所需的图标大小,例如:
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);
这篇关于添加图标时CMFCStatusBar改变高度的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文