Thanks... that did the trick (I'm really surprised too).
> You can force it by calling AfxGetApp()->OnIdle(-1). But it should be
called
> regardless. You can do it at the same time when you do SetCheck.
> --
> Ajay Kalra [MVP - VC++]
> Note: Please post all replies to newsgroup only.
> > That's the first thing I checked actually.... from mainframe, document,
> > view... and even the main app, I'm sure its being routed to only 1 ui
> > command handler.
> > Anyway, I think I found out why... I think I need to force call the
> command
> > UI handler. The UI handler never gets called when I changed the status
of
> > the button so I can start from there for now (i know... if the
SetCheck()
> > were being called without any force updates...why not the Enable()?).
Any
> > message I can send to force call it?
> > TIA,
> > John
> > > The ID might have been used multiple times and somehow the other
handler
> > is
> > > overriding it?
> > > --
> > > Ajay Kalra [MVP - VC++]
> > > Note: Please post all replies to newsgroup only.
> > > > thanks Ajay for your quick response. However, it still doesnt
> > > > enable/disable after the Enable() call. I did try the SetCheck()
and
> I
> > > can
> > > > see the button state change (pressed/unpressed state).
> > > > Anyway, I'll try the MainFrame (im gonna change the program flow to
> > access
> > > > data on my mainframe instead the view from the main document
> though....
> > > > really ugly).
> > > > thanks again,
> > > > John
> > > > > As you suggested, it should work. Make sure of the ID and message
> map
> > > > entry.
> > > > > If you are using SDI, then placing the ON_UPDATE_COMMAND_UI
handler
> in
> > > > view
> > > > > should be OK.
> > > > > --
> > > > > Ajay Kalra [MVP - VC++]
> > > > > Note: Please post all replies to newsgroup only.
> > > > > > I tried to enable and disable some buttons using the command ui
> > > handler
> > > > by
> > > > > > invoking the Enable() function "but it only enables/disables the
> > menu
> > > > > item"
> > > > > > and "not the toolbar itself". I'm doing this inside a View
(which
> I
> > > > don't
> > > > > > see any reason why it shouldn't work). Any ideas what I might
be
> > > > missing
> > > > > > here?
> > > > > > TIA,
> > > > > > John
> > > > > > http://www.johncruise.com
> > > > > > SDI
> > > > > > Win2K
> > > > > > VC++ 6.0