 |
|
 |
If you want to add custom images for submenus in Dialog-based application, modify code this way:
1. In MenuXP.h in class CMenuXP add function:
static void SetMenuItemImage (HMENU hMenu, HIMAGELIST hImgList, int nIndex); 2. In MenuXP.cpp add:
void CMenuXP::SetMenuItemImage (HMENU hMenu, HIMAGELIST hImgList, int nIndex) { CImgDesc imgDesc (hImgList, nIndex); ms_SubMenuImages.SetAt (hMenu, imgDesc); }
3. For example, to add an image for submenu of main menu just call CMenuXP::SetMenuItemImage and use submenu handle instead of item ID for first parameter. To retrieve menu handle call
GetMenu()->GetSubMenu(int nPos0)->GetSubMenu(int nPos1)->m_hMenu in your CDialog. nPos0 - position of top-level submenu nPos1 - position of submenu with your image
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I have downloaded Visual C++ Example: CMenuXP - The Office XP Style Menu By Jean-Michel LE FOL article and code. This application changes all menus, toolbars and status bars to office XP style.
Can I use this code for commercial applications and redistribute the application. Please let me know about this. I want to use this in commercial applications.
How to contact author for lisence?????
Please help me.......................
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Hi, I'm the author of this code ! I'm happy to know that you want to use it in your commercial applications. Please, just add (in AboutBox for example): "Part of code from Jean-Michel LE FOL" or something like that  Thanks
La perfection est atteinte, non pas lorsqu'il n'y a plus rien à ajouter, mais lorsqu'il n'y a plus rien à retirer. (Antoine de Saint-Exupéry)
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
Thanks for your quick reply.
Is there any License for this code....Please give me detailed information.
Thanks & Regards, Ramanujam
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
I'm lookin for any suggestions on how to use this in pure WIN32 project which has only .C files...
Regards & Thanks
|
| Sign In·View Thread·PermaLink | 5.00/5 |
|
|
|
 |
|
|
 |
|
|
 |
|
|
 |
|
 |
This should work:
EnableMenuItem( ID_SAMPLEITEM, MF_GRAYED|MF_DISABLED);
-- "A can't change the laws of physics. A've got to have thirty minutes." -- Scotty, The Naked Time, stardate 1704.3, Episode 7
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
It seems couldn't support the dialog based programme, I could not see the menu defined in the source wizard appears at all,right click and the pop-munu(0) presents. how to solve this?
Lee
|
| Sign In·View Thread·PermaLink | 2.00/5 |
|
|
|
 |
|
 |
Thanks for this excellent article.
How To change menu font (font of menu and submenu items) at runtime ?
Is it possible ? How to implement it ?
BCGControlBar library has somehow implemented it (but that library is too expensive for small project)
Any idea or direction ?
Ana
Ana_v123
|
| Sign In·View Thread·PermaLink | 2.00/5 |
|
|
|
 |
|
 |
Is there a way to make CMenuXP affect only certain menus? I have another menu that is supposed to display like Microsoft's Wordpad's color menu. The menus look good, but I need that one menu to not be drawn like the XP style.
Also, my main toolbar is hidden on startup when I try to create another toolbar to show more icons on the menus... Any idea what could be causing this?
|
| Sign In·View Thread·PermaLink | 1.00/5 |
|
|
|
 |
|
 |
Yes, and thats a problem for me at the moment. Im trying to work out a solution so it *doesnt* happen.
My project is an MDI solution which hosts com controls within each child view. These com controls menu merge their own menu's into the applications main menu.
They do this by calling ::OleCreateMenuDescriptor and then SetMenu. Ultimately COleClientItem::OnSetMenu gets called, which in turns calls a function ::OleSetMenuDescriptor.
I believe its that which is causing the problem (or in your case the solution?).
The normal application menus work fine with MenuXP, but the merged menus all look standard.
Of course there's not much I can do about this without some rejigging unless I want the com controls to lose their messages from the menus.
Ohh and ive tested without a valid descriptor, the menus look good but of course the com controls no longer get their messages (before you ask).
|
| Sign In·View Thread·PermaLink | 2.00/5 |
|
|
|
 |
|
 |
when appling the right to left style the top level menu text doesn't appear!! could anybody help me with that?
k_dehairy
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
I use this class for trial and it seems work. However when i apply this code into application class to stop creating a new MDI child automatically, the menuXP didn't perform correctly AT FIRST TIME. But when you open the file or create a new file, the menuXP class perform well.
you can try to implement this code below in your application class and see what i mean
// Don't display a new MDI child window during startup
if (cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew) cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
cheers Herry
-- modified at 19:02 Saturday 7th January, 2006
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
 |
The XP style is created while updating the frame menu. As you don't create any window you must call UpdateMenuBar manually.
just add the following call after you code, that should do it
CMenuXP::UpdateMenuBar(pMainFrame);
|
| Sign In·View Thread·PermaLink | |
|
|
|
 |
|
|
 |
|
 |
I need to help to implement this class. If anyone is willing to write me step-by-step instruction since I am novice please email me at vip at panet.co.yu
I tried everything but I just can't make it work.
thanks,
|
| Sign In·View Thread·PermaLink | 1.67/5 |
|
|
|
 |
|
|
 |
|
 |
Hello. I was wondering if there was any current support (or successful hacks) for making the menus transparent? Thanks in advance. (And great job thus far.)
|
| Sign In·View Thread·PermaLink | 2.00/5 |
|
|
|
 |
|
|
 |
|
 |
Hi,
to fix the strange/broken look of the system menu, just add the following lines in CMenuXP::SetXPLookNFeel :
...
if ( pWnd->IsKindOf (RUNTIME_CLASS(CMDIFrameWnd)) ) { CMDIChildWnd* pActiveChild = ((CMDIFrameWnd*)pWnd)->MDIGetActive();
if ( pActiveChild != NULL && pActiveChild->GetSystemMenu (false)->GetSafeHmenu() == hMenu ) { CMenuItemXP::ms_rcMRUMenuBarItem.SetRectEmpty(); return; } if ( AfxGetMainWnd() != NULL && AfxGetMainWnd()->GetSystemMenu(false)->GetSafeHmenu() == hMenu ) { CMenuItemXP::ms_rcMRUMenuBarItem.SetRectEmpty(); return; } }
...
greets Ingo
|
| Sign In·View Thread·PermaLink | 1.50/5 |
|
|
|
 |