开发者

How to set toolbar button height?

When adding buttons to a toolbar (using the old Windows API开发者_如何学编程) I can't seem to find a way to change the height of a button. I need to be able to increase the button's height because I'm using large icons.

I'm currently painting everything myself using custom draw because I wanted to be able to have icons with different widths which is not possible when using image lists. However, in order to get the height ok I'd be willing to drop that requirement and use image lists instead of custom draw.


Have you tried the TB_SETBUTTONSIZE message?

// hWndToolbar is a handle to the toolbar window.
int width = 32, height = 32;
SendMessage(hWndToolbar, TB_SETBUTTONSIZE, 0, MAKELPARAM(width, height);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜