Re: ON_UPDATE_COMMAND_UI overridden????
"David Ching" <dc@remove-this.dcsoft.com> wrote in message
news:EC6D6679-154A-44AE-B042-7C5691ADB71A@microsoft.com...
The MFC framework has new values now. The strategy is to take the crap
from BCGSoft and call that the MFC framework. The good news is that MFC
is still evolving and not quite as irrelevant as before. The bad news is
it evolving incompetently. I keep saying it: use the CodeJock MFC
library instead, for modern UI.
Recommendation noted.
The extended MFC seems quite clever when you first look at it, but I'm going
bonkers for lack of documentation. I thought it was great that MFC was
evolving again, and I really want to go with it. I mean we all curse
Microsoft for assorted (mostly valid) reasons, but they've finally gone to
the trouble of providing classes to do a modern UI, and an AppWizard which
creates projects with a modern UI. Surely we ought to be able to work
with it? But where the hell is the documentation?
Looking at the CodeJock site, yes it seems that's an alternative, but I'm a
bit reticent about paying a lot of extra money, and then maybe finding that
it won't do what I want either. I note there's an evaluation copy
available, but I've already invested loads of time going through the
CMFCToolBar etc source code - to the point where any minute now it may dawn
on me how to make it work. :-)
My roll-your-own shortcuts work fine with
BOOL CMainFrame::PreTranslateMessage( MSG* pMsg )
{
BOOL bResult = FALSE;
// Give the frame's keyboard handler a look at this message.
// This will return FALSE very quickly if it is not a
// keyboard message and attempt to handle it if it is one.
// We'll get TRUE back if the message has been handled.
bResult = frmKeybdHandler( *pMsg );
// Now if we haven't handled it explicitly already, do it
// in the standard way via the class we're derived from:
if(!bResult) bResult = CMusFrame::PreTranslateMessage(pMsg);
return bResult;
}
All the clever stuff is in CMainFrame::frmKeybdHandler( *pMsg );
It's just the nitty-gritty details like putting the shortcut text on the
menu (and in the tool tip of toolbar buttons) which are a pain. [The pCmdUI
sets up its internal pMenu data correctly, but this isn't transferring to
the implementation of the menu button].
I'm still also trying to see if I can forget my own stuff and make
accelerators work (preferably allowing me to change text Ctrl+Shift+. to
Ctrl+>).
Neither is going straightforwardly, but a priori I don't have expectations
of CodeJock either :-(
Frustrated,
Dave
--
David Webber
Mozart Music Software
http://www.mozart.co.uk
For discussion and support see
http://www.mozart.co.uk/mozartists/mailinglist.htm