News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

toolbar get command id

Started by ragdog, July 16, 2007, 03:15:18 PM

Previous topic - Next topic

ragdog

hi guys

i have problem with my tollbar!
i select the button command id with TB_GETBUTTON  ??

can your help me or post a small example to select the command id from any toolbar button


greets
ragdog

MichaelW

I'm assuming that you are trying to use the TB_GETBUTTTON message to get the command IDs for the buttons, and the IDs are not what you expect. The attachment is a modification of the example from \masm32\examples\exampl01\comctls\, build as a console app so print can be used to display the IDs. Here is the output:

0       1
50      0
51      0
52      0
0       1
53      0
54      0
55      0
56      0
0       1
57      0
58      0
0       1
59      0

The only unexpected thing I see is that Windows apparently added a separator in front of the first button (TBSTYLE_BUTTON = 0, TBSTYLE_SEP = 1). I didn't have time to test this, but if you specify the buttons as a 13-element array of TBBUTTON structures, passed in a single TB_ADDBUTTONS message, then this might eliminate the leading separator.


[attachment deleted by admin]
eschew obfuscation

ragdog