- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
How I can disable, enable or gray a button of a toolbar
during the program?
(I can do it during creation of the toolbar).
during the program?
(I can do it during creation of the toolbar).
I have (T_TBBUTTON) TBbutton(21)
I try to use type SendMessage with one of the three following parameters :
TB_ENABLEBUTTON
TB_SETSTATE
TB_INDETERMINATE
No result
TB_ENABLEBUTTON
TB_SETSTATE
TB_INDETERMINATE
No result
for example : to disable the button 2 of a toolbar
iret = SendMessage(hWndTB, TB_ENABLEBUTTON, 2, FALSE)
to gray the button 2 of a toolbar
iret = SendMessage(hwndTB, TB_INDETERMINATE, 2, TRUE)
iret = SendMessage(hWndTB, TB_SETSTATE , 2, MAKELONG(TBSTATE_INDETERMINATE, 0))
Thanks,
Link Copied
1 Reply
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
wParam of TB_ENABLEBUTTON should be button ID (the same value you put in T_TBBUTTON.idCommand), not its index.
Jugoslav

Reply
Topic Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page