Click here to Skip to main content
15,913,669 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionPainting in Win32, MFC and WPF ? Pin
Sameerkumar Namdeo27-Jan-10 23:19
Sameerkumar Namdeo27-Jan-10 23:19 
AnswerRe: Painting in Win32, MFC and WPF ? Pin
KingsGambit28-Jan-10 0:06
KingsGambit28-Jan-10 0:06 
QuestionCDocTemplate labelling a file yesAlreadyOpen after a document close Pin
maycockt27-Jan-10 23:02
maycockt27-Jan-10 23:02 
AnswerRe: CDocTemplate labelling a file yesAlreadyOpen after a document close Pin
Richard MacCutchan28-Jan-10 1:51
mveRichard MacCutchan28-Jan-10 1:51 
AnswerRe: CDocTemplate labelling a file yesAlreadyOpen after a document close Pin
krmed28-Jan-10 2:47
krmed28-Jan-10 2:47 
QuestionProblem in loading custom menu Pin
Anu_Bala27-Jan-10 21:31
Anu_Bala27-Jan-10 21:31 
AnswerRe: Problem in loading custom menu Pin
KingsGambit28-Jan-10 0:09
KingsGambit28-Jan-10 0:09 
AnswerRe: Problem in loading custom menu Pin
krmed28-Jan-10 2:32
krmed28-Jan-10 2:32 
I'm going to guess that your application is an MFC MDI app. If that's the case, the MFC framework requires that the main menu MUST contain a minimum of 2 items (Normally File and View).

If you debug your application you should get a Debug Assertion. Click on the retry button and it will take you to the line that caused the problem. In my test case, it's on line 132 of winmdi.cpp (MFC source file). Look at the surrounding code and you'll see
int iMenu = pMenu->GetMenuItemCount() - 2;

// If this assertion fails, your menu bar does not follow the guidelines
// so you will have to override this function and call CreateClient
// appropriately or use the MFC V2 MDI functionality.
ASSERT(iMenu >= 0);

In the comments, it tells you how to handle this - override OnCreateClient.

Hope that helps.

Karl - WK5M
PP-ASEL-IA (N43CS)
PGP Key: 0xDB02E193
PGP Key Fingerprint: 8F06 5A2E 2735 892B 821C 871A 0411 94EA DB02 E193

QuestionDeselecting Tree Node Item in MFC Pin
RS.Ratheesh27-Jan-10 19:53
RS.Ratheesh27-Jan-10 19:53 
QuestionRe: Deselecting Tree Node Item in MFC Pin
David Crow28-Jan-10 3:42
David Crow28-Jan-10 3:42 
QuestionHow to use library files. Pin
Paulraj G27-Jan-10 19:52
Paulraj G27-Jan-10 19:52 
AnswerRe: How to use library files. Pin
CPallini27-Jan-10 21:04
mveCPallini27-Jan-10 21:04 
JokeRe: How to use library files. PinPopular
Nelek27-Jan-10 21:12
protectorNelek27-Jan-10 21:12 
GeneralRe: How to use library files. Pin
CPallini27-Jan-10 21:32
mveCPallini27-Jan-10 21:32 
JokeRe: How to use library files. Pin
Cedric Moonen27-Jan-10 21:47
Cedric Moonen27-Jan-10 21:47 
GeneralRe: How to use library files. Pin
Paulraj G27-Jan-10 21:50
Paulraj G27-Jan-10 21:50 
QuestionRe: How to use library files. Pin
CPallini27-Jan-10 22:14
mveCPallini27-Jan-10 22:14 
GeneralRe: How to use library files. Pin
Nelek27-Jan-10 22:26
protectorNelek27-Jan-10 22:26 
AnswerRe: How to use library files. Pin
Nelek27-Jan-10 21:08
protectorNelek27-Jan-10 21:08 
QuestionFind compression type jpeg image Pin
Game-point27-Jan-10 17:40
Game-point27-Jan-10 17:40 
AnswerRe: Find compression type jpeg image Pin
Rajesh R Subramanian27-Jan-10 18:29
professionalRajesh R Subramanian27-Jan-10 18:29 
QuestionMaking an adaptive studying application [modified] Pin
rbwest8627-Jan-10 14:26
rbwest8627-Jan-10 14:26 
AnswerRe: Making an adaptive studying application Pin
«_Superman_»27-Jan-10 15:53
professional«_Superman_»27-Jan-10 15:53 
GeneralRe: Making an adaptive studying application Pin
rbwest8627-Jan-10 17:32
rbwest8627-Jan-10 17:32 
GeneralRe: Making an adaptive studying application Pin
«_Superman_»27-Jan-10 18:44
professional«_Superman_»27-Jan-10 18:44 

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.