How to set toolbar button height?

When adding buttons to the toolbar (using the old Windows API), I cannot find a way to change the height of the button. I need to increase the height of the button because I use large icons.

I am currently drawing everything myself using a custom draw, because I wanted to have icons with different widths, which is not possible when using image lists. However, in order to get the height, I would like to abandon this requirement and use image lists instead of custom drawing.

+5
source share
1 answer

Have you tried the message TB_SETBUTTONSIZE ?

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

All Articles