Click here to Skip to main content
15,909,440 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralBlit to a CBitmap Pin
Christoph Rupp9-Jun-00 5:04
sussChristoph Rupp9-Jun-00 5:04 
GeneralRe: Blit to a CBitmap Pin
Paolo Messina9-Jun-00 13:34
professionalPaolo Messina9-Jun-00 13:34 
GeneralDeviceCapabilities Pin
Gen12-Jun-00 23:29
Gen12-Jun-00 23:29 
GeneralImplementing "Parent" properties in the OO Land Pin
Matthias12-Jun-00 22:34
Matthias12-Jun-00 22:34 
GeneralRe: Implementing Pin
Uwe Keim12-Jun-00 23:17
sitebuilderUwe Keim12-Jun-00 23:17 
GeneralRe: Implementing Pin
Alvaro Mendez13-Jun-00 5:30
Alvaro Mendez13-Jun-00 5:30 
GeneralThank you guys! Pin
Matthias13-Jun-00 9:27
Matthias13-Jun-00 9:27 
QuestionHow do I create popup submenus dynamically Pin
Mike newberry12-Jun-00 5:52
sussMike newberry12-Jun-00 5:52 
I am finding it impossible to create a popup submenu dynamically inside an existing popup menu (from a template) and then populate it with menu items. I'm trying to modify the tempalte menus inside the CMainFrame::OnInitMenuPopup() handler. I've been through all the CMenu documentation and can't figure out the trick to this. I can insert and append menu items to my heart's content, but not popups! Is there sample code somewhere for doing this sort of thing?

More details: I can successfully create a submenu entry in the popup using CMenu::InsertMenu(..., MF_POPUP, ...) but there is no right arrow in the menu. Also, when I open the popup menu a second time, the submenu entry is grayed out. So I don't seem to be able to begin the submenu successfully, nor can I populate it. I would guess that populating the submenu would also be done by OnInitMenuPopup() when it was called (*if* I could get an arrow on the submenu entry!). A big question here is then how I could know that it is my submenu being passed into OnInitMenuPopup() since there are not any commands yet defined to test against. I was thinking of saving the m_hMenu when I created the submenu and then checking against the CMenu->m_hMenu passed into OnInitMenuPopup()? But this seems a little kludgy. I'm certainly not a "beginner" and I can't figure it out from the docs I've found. Why did they make it this hard?

Mike Newberry
AnswerRe: How do I create popup submenus dynamically Pin
GeVanCo19-Jun-00 20:11
GeVanCo19-Jun-00 20:11 
GeneralRe: How do I create popup submenus dynamically Pin
GeVanCo19-Jun-00 20:20
GeVanCo19-Jun-00 20:20 
GeneralLocalization (Date Time Numeric Currency Pin
Gary12-Jun-00 4:45
Gary12-Jun-00 4:45 
GeneralRe: Localization (Date Time Numeric Currency Pin
Mike Dunn12-Jun-00 9:45
Mike Dunn12-Jun-00 9:45 
GeneralAdding to IE context menu Pin
Bhaskar12-Jun-00 4:28
Bhaskar12-Jun-00 4:28 
GeneralUsing Bookmarks with Jet OLEDB Provider Pin
QamarAlZaman Habeek12-Jun-00 1:21
sussQamarAlZaman Habeek12-Jun-00 1:21 
Generalactivating a view with a mouse click Pin
Steve Kearon11-Jun-00 22:39
Steve Kearon11-Jun-00 22:39 
GeneralRemoving DLL exports Pin
Ben Burnett11-Jun-00 21:38
Ben Burnett11-Jun-00 21:38 
GeneralRe: Removing DLL exports Pin
Tim Deveaux12-Jun-00 12:41
Tim Deveaux12-Jun-00 12:41 
GeneralResource Difference Tool Pin
Blake Miller11-Jun-00 17:48
Blake Miller11-Jun-00 17:48 
GeneralRe: Resource Difference Tool Pin
Paolo Messina12-Jun-00 11:30
professionalPaolo Messina12-Jun-00 11:30 
GeneralLearning ATL Pin
Ryan Park11-Jun-00 15:07
Ryan Park11-Jun-00 15:07 
GeneralRe: Learning ATL Pin
Alex Gorev12-Jun-00 4:03
Alex Gorev12-Jun-00 4:03 
GeneralRe: Learning ATL Pin
Alfadhly12-Jun-00 5:42
sussAlfadhly12-Jun-00 5:42 
GeneralLearning MFC Pin
Donnie11-Jun-00 6:00
Donnie11-Jun-00 6:00 
GeneralRe: Learning MFC Pin
Arvind2311-Jun-00 10:05
Arvind2311-Jun-00 10:05 
GeneralRe: Learning MFC Pin
Buck12-Jun-00 15:14
Buck12-Jun-00 15:14 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.