Thanks Serge, got it!:)
mclpun
Posts
-
Hide & Show Menu bar dynamically -
Hide & Show Menu bar dynamicallyHi All, I' m writing a Visual C++ MFC dialog-based program. I added a Menu bar uisng Insert->Resource-> Menu, not by writing code. Then, I tried to show and hide the Menu bar of a modal dialog dynamically. By writing the following code, I succeed to hide the menu bar. CWnd* pMain = AfxGetMainWnd(); if (pMain != NULL) { CMenu* pMenu = pMain->GetMenu(); while(pMenu != NULL && pMenu->GetMenuItemCount() > 0) { pMenu->DeleteMenu(0, MF_BYPOSITION); pMain->DrawMenuBar(); } } But how can I show the menu again? Please kindly help me! Cheers, hmc
-
Show and Hide the Menu bar dynamicallyHi Freind, Thanks. But I only successfully hide the Menu, but not showing it again. Do I just need to replace "pMenu->DeleteMenu(0, MF_BYPOSITION);" to "pMenu->AppendMenu(0, MF_BYPOSITION);" without changing other code? Cheers
-
Dynamically Show and Hide Title barThanks for your help, k_dehariy! Meanwhile, how can I set the caption of the title bar dynamically?
-
Dynamically Show and Hide Title barHi All, I' m writing a Visual C++ MFC dialog-based program. I tried to show and hide the title bar of a modal dialog dynamically but didn't succeed? Could anyone kindly helps me? Thanks! Cheers, Jack