Home > Software engineering >  MFC program hidden window to start the big probability jammed under Windows 7
MFC program hidden window to start the big probability jammed under Windows 7

Time:11-09

I wrote a program that USES the VS2008, the computer is Win10, wrote a MFC procedures, MFC if hidden window when starting, the probability of large lag will start a few seconds, even used in Wnd SetWindowPos display window, also has a lot to the probability that the card dead, window did not appear, like the App InitInstance method didn't perform to initialize the Wnd side, but if the App class AfxMessageBox pop-up a window into the InitInstance method, program can perform normally, does anyone know why this is?

CodePudding user response:

Write the log to see where is the card, the probability is code has a problem, has little to do with a hidden window

CodePudding user response:

MFC startup if hidden window
In the code

CodePudding user response:

Debugging, stuck, pause, take a look at what position


CodePudding user response:

Can't debugging in the InitInstance () in the following code:
 
INITCOMMONCONTROLSEX InitCtrls;
InitCtrls. DwSize=sizeof (InitCtrls);
InitCtrls. DwICC=ICC_WIN95_CLASSES;
InitCommonControlsEx (& amp; InitCtrls);

AfxMessageBox (_T (" 123 "));

123 don't play CARDS are dead, I feel may be too much memory for the program, Windows 7 didn't give enough, success program memory is occupied more than 40000, failure is the memory usage in 10000 the following, then stuck directly, the memory are the same

CodePudding user response:

AfxEnableControlContainer (); ?

CodePudding user response:

Antivirus software prevents? Firewall/antivirus software closed try

  • Related