Originally posted by: Why Zhang
I want to create a popup menu whose menuitems are image(or ownerdraw) without text when sending TOOLBARDROPDOWN message, like selecting the Line mode in Ms Word.
I have failed some times.
Who can help you? Better give me a example?
SOS!
ReplyOriginally posted by: William P Best
This code is from BOOL CMyApp::InitInstance()
//*** Code added ***//
// Dispatch commands specified on the command line
The bitmaps are not created at startup when a document is not first loaded. Is there any way to fix this?
...
...
...
// Parse command line for standard shell commands, DDE, file open
CCommandLineInfo cmdInfo;
ParseCommandLine(cmdInfo);
// Disable creating a new document at startup
if(cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew)
cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
//*** end of code ***//
if (!ProcessShellCommand(cmdInfo))return FALSE;
...
...
...
Originally posted by: Lee Emmert
Replace line 391 of BCMenu.cpp:
GetMenuItemInfo((HMENU)lpDIS->hwndItem,lpDIS->itemID,MF_BYCOMMAND,&info);
with:
GetMenuItemInfo(lpDIS->itemID,&info,FALSE);
Now it'll compile and it'll work just like normal :-) Very nice class, BTW!!
-Lee Emmert
Ok, As I've been rebuilding a few of my projects with my newly-installed VC++ 6, I noticed a problem. When
the class file would compile, I would get an error that GetMenuItemInfo doesn't take 4 parameters... well, it
doesn't. That is, the new CMenu class has updated this slightly, and here's the fix to the BCMenu.cpp ver
2.3
lemworld@lemworld.com
http://www.lemworld.com
Originally posted by: Michael Peponis
In the BCMenu::DrawItem() member function definition in BCMenu.cpp, there is
GetMenuItemInfo((HMenu)lpDIS->hwndItem,lpDIS->itemID,MF_BYCOMMAND,&info);
This is the SDK implementation of GetMenuInfoItem, since BCMenu extends CMenu, use
GetmenuItemInfo(lpDIS->itemID,&info,MF_BYCOMMAND);
Thanks.
It's nice code, did find one small glitch when attempting to compile,so I will
spare others the headache.
a line of code that's slightly off
the CMenu implementation which would be
Originally posted by: Devendra Bahirat
This is very good general purpose class that can be included
in any project. I saved a lot of my time.
Good job.
Thanks
Devendra