Click here to Skip to main content
15,914,452 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Template parameter interpreted as base, not derived Pin
Member 260377223-Jan-09 7:12
Member 260377223-Jan-09 7:12 
GeneralRe: Template parameter interpreted as base, not derived Pin
Stuart Dootson23-Jan-09 8:16
professionalStuart Dootson23-Jan-09 8:16 
AnswerRe: Template parameter interpreted as base, not derived [modified] Pin
Rajkumar R23-Jan-09 7:02
Rajkumar R23-Jan-09 7:02 
GeneralRe: Template parameter interpreted as base, not derived Pin
Member 260377223-Jan-09 7:14
Member 260377223-Jan-09 7:14 
QuestionCMFCMenuBar menu manipulation problem. Pin
oleg6323-Jan-09 4:39
professionaloleg6323-Jan-09 4:39 
AnswerRe: CMFCMenuBar menu manipulation problem. Pin
Shashikant_200612-Feb-09 23:53
Shashikant_200612-Feb-09 23:53 
GeneralRe: CMFCMenuBar menu manipulation problem. Pin
oleg6326-Feb-09 5:33
professionaloleg6326-Feb-09 5:33 
GeneralRe: CMFCMenuBar menu manipulation problem. Pin
neuroscript30-Jan-10 13:18
neuroscript30-Jan-10 13:18 
The problem is a "glitch" (that's how I refer to it) in BCG's design of these extensions. The correct code is below (an example for removing an item), but be sure to look below the code for the important part. NOTE: "n" = your sub menu and "ID" = the ID of the menu item you want to remove.

CMenu* pMenu = CMenu::FromHandle( m_wndMenuBar.GetHMenu() );
CMenu* pSubMenu = pMenu ? pMenu->GetSubMenu( 0 ) : NULL;
if( pSubMenu ) pSubMenu->RemoveMenu( ID, MF_BYCOMMAND );

IMPORTANT (see below, too): You must FIRST go to the registry and DELETE the entry for you product. HKCU/Software/Your Product. You can just delete the correct folder for the menu, but that's up to you to figure out which one it is.

PROBLEM: This will solve it for you and new users of your product. However, existing users will never see the changes. There is a function CWinAppEx::CleanState(), which is supposed to remove memory from the registry. But, you will then have an app with no memory of toolbars, menus, etc...meaning customization is pointless.

Good luck!
QuestionFile>New. Window Resizes? Pin
theAce8923-Jan-09 4:16
theAce8923-Jan-09 4:16 
AnswerRe: File>New. Window Resizes? Pin
Randor 23-Jan-09 7:04
professional Randor 23-Jan-09 7:04 
GeneralRe: File>New. Window Resizes? Pin
theAce8929-Jan-09 11:07
theAce8929-Jan-09 11:07 
QuestionGet List of applications only Pin
vikrant kpr23-Jan-09 1:19
vikrant kpr23-Jan-09 1:19 
AnswerRe: Get List of applications only Pin
Nishad S23-Jan-09 1:49
Nishad S23-Jan-09 1:49 
AnswerRe: Get List of applications only Pin
Sarath C23-Jan-09 1:57
Sarath C23-Jan-09 1:57 
QuestionHow to change size of dialog box @ run time? Pin
sam_psycho23-Jan-09 0:50
sam_psycho23-Jan-09 0:50 
AnswerRe: How to change size of dialog box @ run time? Pin
Code-o-mat23-Jan-09 0:52
Code-o-mat23-Jan-09 0:52 
AnswerRe: How to change size of dialog box @ run time? Pin
Cedric Moonen23-Jan-09 0:54
Cedric Moonen23-Jan-09 0:54 
GeneralRe: How to change size of dialog box @ run time? Pin
sam_psycho23-Jan-09 1:02
sam_psycho23-Jan-09 1:02 
QuestionCEdit SetPasswordChar SetFont [modified] Pin
Taulie22-Jan-09 23:07
Taulie22-Jan-09 23:07 
AnswerRe: CEdit SetPasswordChar SetFont Pin
Code-o-mat23-Jan-09 0:00
Code-o-mat23-Jan-09 0:00 
GeneralRe: CEdit SetPasswordChar SetFont Pin
Taulie23-Jan-09 1:06
Taulie23-Jan-09 1:06 
GeneralRe: CEdit SetPasswordChar SetFont Pin
Code-o-mat23-Jan-09 4:00
Code-o-mat23-Jan-09 4:00 
GeneralRe: CEdit SetPasswordChar SetFont Pin
Taulie23-Jan-09 4:03
Taulie23-Jan-09 4:03 
GeneralRe: CEdit SetPasswordChar SetFont Pin
Code-o-mat23-Jan-09 4:06
Code-o-mat23-Jan-09 4:06 
GeneralRe: CEdit SetPasswordChar SetFont Pin
Taulie23-Jan-09 4:15
Taulie23-Jan-09 4:15 

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.