|
|
Comments and Discussions
|
|
 |

|
I currently use the BCMenu system and it shows my 16 x 16 toolbar images against the relevant menu items.
A user has provided me with some 32 x 32 images (256 colours) that he would like me to consider using for my toolbar. I am happy to try but have concerns about what will happen to my menu items.
Has anyone done this kind of thing before?
Please clarify.
Andrew
|
|
|
|

|
I could not make a menu item MF_GRAYED
In dialog mode ,
I use BCMENU as main and single menu ,
It run OK,
but ,
I could not make a menu item grayed while CMenu will do.
I add code as below in InitDialog function
m_menu.LoadMenu(IDR_MYMENU);
m_menu.EnableMenuItem(ID_VLINK_CLOSE,MF_GRAYED);
......
it won't work, why?
or I should change it in other function?
Hello,
pleasure to meet you.
|
|
|
|

|
I've discover that if I remove the 'ON_COMMAND( ..., ... )' for an menu item, this one will appear disabled, and then do not send any message when clicked etc..
Is there a way to not getting in charge of adding such command in message map ? I explain myself, I buid dynamicly my menu and so i can't add the ON_COMMAND. I resolve this by using ON_COMMAND_EX_RANGE but I dislike that...
I'm pretty new to MFC...
Sorry if this question appear dumb... but ...
Tx,
|
|
|
|

|
I created BCMenu instance with several popup items in main menu and noticed that items with submenu has not the same size as other menu items.
See example screenshoot
How to fix this problem?
Sincerely Yours,
RadioShark
|
|
|
|

|
HI friends,
Its a nice class to make our menus XP Style.I am facing an issue that hotkeys are not working when i use BCMenu as POP Up menu although they are working normally when when i dont use them as context menu..here is sample code
BCMenu aMenu;
CPoint pt(X,Y);
ClientToScreen(&pt);
switch(itemType)
{
case -1:
{
if(m_tree.CountChildren(root) == 0 && m_nAutoPopulate_Type == 2)
{
aMenu.LoadMenu(IDR_MENU_SITE_ROOT2);
aMenu.GetSubMenu(0)->TrackPopupMenu(TPM_LEFTALIGN|TPM_RIGHTBUTTON,pt.x+25,pt.y,this);
}
}
|
|
|
|

|
Is it possible to insert a control, like an edit box, in a popup menu item?
|
|
|
|

|
Now, i am programing my program with BCMenu class.
this program should be made in each language type. and then i have used SetMenuText function for changing menu string.
but i couldn't change upper menu string.
> some code
m_menu.SetMenuText(0,"FILE(&F)"); <-- it didn't change
m_menu.SetMenuText(ID_PHONE_CONNECT,"CONNECT", MF_BYCOMMAND); <-- it changed.
How can change upper menu string ?
please help me.. ..
|
|
|
|

|
I'm having some problems using BCMenu.
m_bcMainMenu.CreatePopupMenu();
m_bcMainMenu.SetMenuDrawMode( BCMENU_DRAWMODE_XP );
m_bcContextMenu = m_bcMainMenu.AppendODPopupMenu( "Popup menu item" );
m_bcContextMenu->SetMenuDrawMode( BCMENU_DRAWMODE_XP );
doing this the string "Popup menu item" doen's appear, it looks like the measure item function doesn't get called.
thanks for all your help
Jose Valente
|
|
|
|

|
wchar_t * can't change to cstring !!!!
|
|
|
|

|
How can I change the font of these menu items ?
Help me, please.
Nguyen
|
|
|
|

|
Hi guys,
i have the following problem - i am using BCMenu in an MDI aplication but when there is a document open menu icons are not visualised. I tracked the problem to the fact that CMainFrame::OnInitMenuPopup is recieving a CTempMenu instead of BCMenu object.
Does anyone had the same problem and what can be done to correct this?
Thanks in advance.
|
|
|
|

|
Only can use AppendMenu or InsertMenu to add information to items, but you can never retrieve the information from items.
I need use BCMenu to display a context menu, I tried to get items from main menu and combine them, but failed to do this.
|
|
|
|

|
How to set menu to CWnd but not CFrameWnd or CDialog ?
|
|
|
|

|
I am confused about how to get a SubBCMenu. To get a CMenu, you can use the functions:
CMenu* GetSubMenu (int nPos);
However, you cannot do the same for BCMenu:
BCMenu* GetSubBCMenu(char* lpszSubMenuName);
So, why is there no way to get a sub menu by index as well? Having a dependency on the text of the menu seems not like a good design idea.
I need to dynamically change the text of submenus, and if I get a CMenu and change the text, it looks ugly. So I have to use the BCMenu function, but I'm unable to get the BCMenu because of lack of an easy functions to use.
How do you guys do it?
|
|
|
|

|
Hello,
when I use the XP style menu mode, the main menu item like "File" and "View" will be displayed
without marking the connected shortcut.
When I press the ALT key, the F of FILE will be underlined.
Is there a way to display the connected shorted (with an underline) directly (like
it will be done in the standard menu) ?
Just a little question.
The menu tool is perfect for out application and I´d like to thank the authors
Best regards
Manfred
|
|
|
|

|
First of all: Class BCMenu is a cool thing
But now my problem. I use the BCMenu code in a MDI project. But my accelerators will not work. Is there anybody out there who can tell me why?
Thanx to all and may the force be with you.
|
|
|
|

|
hi
actually i want to create a popup menu at click of my toolbar button.
i dont know how to create the the popup menu with different menuitems at run time.
if anyone has the idea and code please help me.
thanx a lot in advance
|
|
|
|

|
Great Code. I combined this with the drop-down toolbar, and now
I have menus with bitmaps in my toolbar.
Just had to hack the MainFrm section some.
-Jeff
|
|
|
|

|
I cannot use BCMenu in eVC++ 4 (for WM2003). Is it compatible with WinCE and eVC++? If so, please let me know how to. Help~~!!
|
|
|
|

|
i use insertmenu( 0, .._BYPOSITION, MF_SEPE.., "" )
but it look so awful
|
|
|
|

|
I want to load a bitmap file at runtime on a dialog.The bitmap file would be created at the runtime.
|
|
|
|

|
I'm success with Menus, but I don't create Cool Menus with Popup Menus.
Please show me!
LonelyStar
|
|
|
|

|
if bcmenu is setting to LoadCheckmarkBitmap(IDR1,IDR2),
when bcmenu is destroyed,
checkmaps is not deleted,
hi
|
|
|
|

|
Hi there,
Nice implementation! But what about the menu bar? It still looks like crap, with those white anomalies all around it, etc...
Cheers,
swine.
[b]yte your digital photos with [ae]phid [p]hotokeeper - www.aephid.com.
|
|
|
|

|
hi ,
i have included the bcmenu in my dialog based application ...but the accelerator is not working .. why is it so .. please help.
Thanking you.
Satadru
|
|
|
|

|
Hi:
In plugin, where could I add the message handlers for the WM_MEASUREITEM, WM_MENUCHAR, and WM_INITMENUPOPUP messaga (No CMainFrame or CDialog).If I don't add these handles ,no text will show on the menu.
Thanks
Benben
|
|
|
|

|
First I wanna thank you for a great job!!
Secone, I'd like to request MENUEX to be supported as well.
I found out that a project I work with uses MENUEX instead of MENU (You can find it in ProjectName.rc). In this case, the LoadMenu() method on BCMenu flips out and the menu becomes really strange looking. When I changed to use MENU instead it all worked well. For now I'm fully satisfied with MENU, but from what I can understand, MENUEX offers some extra features and in the future I might wanna use it...
Are there any plans of implement support for MENUEX in this project?
|
|
|
|

|
Is there anybody who converted this to an activex control.
Regards
G
|
|
|
|

|
Hi I am fairly new with MFC programming and have come across a puzzle which I cant quite decipher any help would be greatly appreciated
I have a class CDisplayFrame derived from CFrameWnd
I want to use accelerator keys along with the menus. I have create an acc table and matched the keys Ctrl +C with ID_CWEDIT_COPY, Ctrl +v with ID_CWEDIT_PASTE and similarly for cutting. Each of these menu items have message handlers for them . My problem is my accelerator keys never call that message handler
I have done the following in my app class
BOOL CCWDisplayApp::InitInstance()
{
CDisplayFrame * pFrame = new CDisplayFrame ;
m_pMainWnd = pFrame;
pFrame->Create(lpszClass, NULL, WS_CAPTION | WS_POPUP, pFrame->rectDefault,
NULL, NULL, WS_EX_TOOLWINDOW);
LPCTSTR lpszResourceName =MAKEINTRESOURCE(IDR_ACCELERATOR1);
BOOL ret =pFrame->LoadAccelTable(lpszResourceName);
return CWinApp::InitInstance();
// return TRUE;
}
Can anyone help me solve this puzzle?????????
Thanks in advance
newbee78
|
|
|
|

|
Ive 2 top level menu items File & View.
In windows 2000 and NT there is a huge gap b/n File & View.
In windows NT when I click on File and then on View, the menu drops down and all the items width take the entire screen width.
why is that ???
|
|
|
|

|
Hi, I have a stupid question. If I use AppendODPopupMenu (i.e. contextmenu in a dialog), do I have to delete the submenu when my dialog ends or does the destuctor of BCMenu this job?
thank You!
Dieter
|
|
|
|

|
error C2440: 'initializing' : cannot convert from 'wchar_t *' to 'ATL::CStringT<BaseType,StringTraits>'
in
BOOL BCMenu::ModifyODMenuW(wchar_t *lpstrText,wchar_t *OptionText,
int nIconNormal)
{
.....
CString junk=OptionText;
....
}
|
|
|
|

|
Hi.
I use BCMenu for 3 years now and It worked perfectly. Recently I installed Visusal Studio .Net 2003 and migrated my c++ projects on it.
I Had no problems until I created new sub menus in my resource in the .Net resources editor. After that, BCMenus seems to be corrupted.
Have you encontered this problem and if yes , could you help me ?
|
|
|
|

|
Your class works great, thanks a lot!!!
I am trying to create a bitmap during runtime. I would like to use an RGB color to create a bitmap (15x16) of just that color to modify my meny item with new color(user select) icon(bitmap).
This is my code:
BCMenu *pMenu = (BCMenu *)AfxGetMainWnd()->GetMenu()->GetSubMenu(4);
//create BITMAP
///******************************************************************
HDC hdc= ::GetDC(NULL);
HDC dc = ::CreateCompatibleDC(hdc);// here your code
BITMAPINFO i;
ZeroMemory( &i.bmiHeader, sizeof(BITMAPINFOHEADER) );
i.bmiHeader.biWidth=16; // Set size you need
i.bmiHeader.biHeight=15; // Set size you need
i.bmiHeader.biPlanes=1;
i.bmiHeader.biBitCount=32; // Can be 8, 16, 32 bpp or other number
i.bmiHeader.biSize=sizeof(BITMAPINFOHEADER);
VOID *pvBits;
HBITMAP hbmp= CreateDIBSection( dc,
&i,
DIB_RGB_COLORS,
&pvBits,
NULL,
0 );
RECT rc; rc.left = 0; rc.top = 0; rc.right = 16; rc.bottom = 16;
HBITMAP hBmpOld = HBITMAP(SelectObject( dc, hbmp));
HBRUSH hBrush = CreateSolidBrush( RGB(255,0,0));
FillRect( dc, &rc, hBrush);
if(hbmp)
{
CBitmap bmp;
bmp.Attach(hbmp);
pMenu->ModifyODMenu(NULL,ID_TOOLS_COLOR,&bmp);//menu id item
bmp.Detach();
DeleteObject(hbmp);
}
::DeleteDC(dc);
SelectObject( dc, hBmpOld);
DeleteObject( hBrush);
But I got always black rectangle (not color)
Please help me.I'm very need your help
|
|
|
|

|
How Can I use the office xp style menu in child frame?
|
|
|
|

|
I am using the BCMenu class in an MDI that uses views but no documents. Prior to using the BCMenu, the system would automatically add the open windows to the list under the Window menu. Since inserting the BCMenu, this no longer happens.
Any suggestions?
Thanks,
Peter Pepperell
ppepperell@wicksbroadcastsolutions.com
|
|
|
|

|
When I use InsertODMenuW() for my popup menu with bitmap, it crashes. Changing "mdata->menuIconNormal = nIconNormal" to "mdata->menuIconNormal = -1", which I find in AppendODMenu(), seems fixed the problem.
Chi
|
|
|
|

|
(checked only on W2k) If the app sets the transparency value for the main window and the menu have XP style set, the checked items are not redrawed correctly (no check mark appears). For a smart fix simply always call the DrawCheckMark() member with the narrowflag parameter set to FALSE.
Luca Piergentili
http://www.geocities.com/lpiergentili/
|
|
|
|

|
Hi, I'm using BCMenu in my MDI application and problem is, when I'm changing documents.
Each document has own menu.
1.I open first document and then second.
2.I close the second one.
Now the first document has right menu but there are no bitmaps...
Where could be bug?
Thanks
Tomas Jakl
|
|
|
|

|
... the Office XP style topmost menu titles (File, Edit, View, Tools, etc. with shadow painting on select.
Anyone out there perhaps added that to BCMenu 3.03 ? Please drop me a line.
Excellent job, BCMenu is probably the best looking XP style menu on CodeProject.
Thanks!
Gary
|
|
|
|

|
Hi,
I am not able to use this menu in my ATL Composite control that has MFC support.
I have to use it as per my project menu.
I have to show popup menu on right click in control.
Thanx for any help in advance.
Susheel Chauhan
|
|
|
|

|
When I customize the system menu,I can't make it work well. I set the system menu in xp mode,but it works as default. Thanks. Comebackid
|
|
|
|

|
How do I use this bitmap menus for context menus? Do I need to implement the handlers in the parent of the menu? (4th parameter in CMenu::TrackPopupMenu). If I do, it's a bit odd, since my menu is an automatic variable and not a member variable. What implementation should I put inside the handlers? Do I have to make the popup menu a member variable? (HWND). I guess if I do that, I'll have issues with creating / destroying it. Too many questions, too little time...
Barak
|
|
|
|

|
Some of the bitmaps from the toolbars do not display correctly and appear to be moved across by a few pixels. If you want to see an example I am willing to send you one.
|
|
|
|
|

|
in function
// Larry Antram
BOOL BCMenu::SetMenuText(UINT id, CString string, UINT nFlags/*= MF_BYPOSITION*/ )
UINT numMenuItems = m_MenuList.GetUpperBound();
the value of numMenuItems is 3722304988 !
|
|
|
|

|
I get a runtime error when I try to insert item with MF_POPUP style set. Any suggestion?
|
|
|
|

|
how to use BCMenu in SDK MDI program?
Thanks!
|
|
|
|

|
To carry the metaphor of having the menu echo toolbar bitmaps, it would be nice to be able to have bitmaps for submenu items (i.e., items with MF_POPUP set) in BCMenu as well, so that toolbar buttons with the TBSTYLE_DROPDOWN style could be echoed in the menu.
Since Drawitem does get an invocation for submenu labels, this should be doable, but there doesn't seem to be a way to assign the bitmap image at present since the submenu item won't have a standard command id.
I'm curious if I've missed something and this can be done as presently implemented, or if not, what it would take to add it.
|
|
|
|

|
I'm using the BCMenu class as a popup menu and uses the CButtonST class found here on codeproject to handle the menu.
But when the application closes .NET reports some memory leaks, using AfxEnableMemoryTracking(TRUE);.
After what I've found out it seams like there are several BCMenuData classes left after the program exits. In my app I but a global counter in the constructor and destructor of that class and when the BCMenu class run it's destructor there where 6 BCMenuData classes left so it seams that not all those classes get deleted.
|
|
|
|

|
if i define a BCMenu and call the loadMenu method of BCMenu ,when i run the program the menu will be shortened. No text will be appear.
If Toolbar images added to the Menu then only images will be appear in the menu.
I am trying to display a popup menu when user presses right mouse button but i found failure displaying it.
This is a big bug which decreases the usefulness of this component.
|
|
|
|
 |
|
|
General News Suggestion Question Bug Answer Joke Rant Admin
|
This class implements an owner drawn menu class that mimics the menu style used in XP, Office and Visual C++
| Type | Article |
| Licence | CPOL |
| First Posted | 18 Nov 1999 |
| Views | 758,084 |
| Downloads | 13,604 |
| Bookmarked | 263 times |
|
|