displayed in a clicked state. Which is the normal functionality.
AliR.
I got it.
It works if you set the text.
I'm not sure what else works, but that does.
It is the only difference between the one that worked
and the one that didn't work.
Add the following
pCmdUI->SetText("");
if(theApp.GetWav()->GetFftRtEnable()) {
m_tbWave.GetButtonInfo(7, nID, nStyle, iImage);
m_tbWave.SetButtonInfo(7, nID, nStyle, 11);
pCmdUI->SetText("Check");
}else{
m_tbWave.GetButtonInfo(7, nID, nStyle, iImage);
m_tbWave.SetButtonInfo(7, nID, nStyle, 7);
pCmdUI->SetText("UnCheck");
}
What a pain.
"Nobody" <Nobody@yahoo.com> wrote in message
news:OnWWKUnZHHA.4832@TK2MSFTNGP02.phx.gbl...
I have the same symptoms as you.
I don't know where you are handling the messages.
I'll bet is in some View class.
I noticed that it only seems to work if both the ON_COMMAND and
ON_UPDATE_COMMAND are handled in the Mainframe.
Then in ON_COMMAND, you would have to send a message to your view
notifying it that a button has been pressed.
You can enable/disable the button by using
theApp.GetSomeClass()->GetEnable();
That's the way I do it anyways.
"StevenLK" <StevenLK@newsgroup.nospam> wrote in message
news:%23zowbsmZHHA.588@TK2MSFTNGP06.phx.gbl...
Would anybody know why the bitmaps in my menus do appear depressed when
I am setting the checked state in my command update handler. For
example:
ON_UPDATE_COMMAND_UI(ID_SHOW_SPLITVIEW, OnUpdateShowSplitView)
void CSomeDoc::OnUpdateShowSplitView(CCmdUI* pCmdUI)
{
pCmdUI->SetCheck( TRUE );
}
If I have a menu item associated with the ID set to ID_SHOW_SPLITVIEW
and a toolbar resource that contains a button with the same ID
(ID_SHOW_SPLITVIEW ), shouldn't the bitmap be displayed differently in
the dropdown menu when I set the checked state to TRUE?
The button does change its visible appearance in the toolbar however.
Any input whould be much appreciated.