On Aug 18, 12:42 am, "Giovanni Dicanio" <giovanni.dica...@invalid.it>
wrote:
"RAN" <nijenh...@wish.nl> ha scritto nel messaggionews:1187388058.841702.192550@k79g2000hse.googlegroups.com...
1) It is a modal dialog.
2) The command enables are in the dialog class not the derived toolbar
class
3) I have added ON_MESSAGE(WM_KICKIDLE, &CClientDlg::OnKickIdle)
I get :
ClientDlg.cpp
C:\Program Files\DevStudio\MyProjects\Client\ClientDlg.cpp(109) :
error C2065: 'WM_KICKIDLE' : undeclared identifier
Try #include <afxpriv.h> in StdAfx.h.
Giovanni
1) The include <afxpriv.h> worked. WM_KICKIDLE is now known and the
OnKickIdle handler is called, but the void
CClientDlg::OnUpdateToolbarChat(CCmdUI* pCmdUI) is never called.
2) I tried the solution from Nobody :
void CClientDlg::OnToolbarChat()
{
// TODO: Add your command handler code here
if(b_ChatChecked == FALSE)
{
o_ClientToolBar.SendMessage(TB_SETSTATE, ID_TOOLBAR_CHAT,
TBSTATE_CHECKED);
b_ChatChecked = TRUE;
}
else
o_ClientToolBar.SendMessage(TB_SETSTATE, ID_TOOLBAR_CHAT,
TBSTATE_ENABLED);
}
The button is checked but if i press it again the
CClientDlg::OnToolbarChat() is not called again so i can't set the
button back to the normal state. (I tried TBSTATE_ENABLED, not sure if
this is the right thing) But it doesnt matter because its only called
once and after it is checked i can't get back in!
More suggestion are more than welcome!- Hide quoted text -
- Show quoted text -
setting it back at an other OnToolBarButton() handler.