Click here to Skip to main content
15,887,683 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionID_FILE_NEW causes application crashed [modified] Pin
transoft7-Sep-09 10:58
transoft7-Sep-09 10:58 
AnswerRe: ID_FILE_NEW causes application crashed Pin
Richard MacCutchan7-Sep-09 11:36
mveRichard MacCutchan7-Sep-09 11:36 
GeneralRe: ID_FILE_NEW causes application crashed Pin
transoft7-Sep-09 16:58
transoft7-Sep-09 16:58 
GeneralRe: ID_FILE_NEW causes application crashed Pin
Richard MacCutchan7-Sep-09 23:25
mveRichard MacCutchan7-Sep-09 23:25 
AnswerRe: ID_FILE_NEW causes application crashed Pin
SandipG 7-Sep-09 21:39
SandipG 7-Sep-09 21:39 
GeneralRe: ID_FILE_NEW causes application crashed Pin
transoft8-Sep-09 2:12
transoft8-Sep-09 2:12 
AnswerRe: ID_FILE_NEW causes application crashed Pin
David Crow8-Sep-09 3:31
David Crow8-Sep-09 3:31 
GeneralRe: ID_FILE_NEW causes application crashed Pin
transoft8-Sep-09 3:50
transoft8-Sep-09 3:50 
Hi
The App.exe did not give me any hints. When I tried to use JIT debugger to find the bug, JIT debugger seems hanging there. It looks like stuck in a never end loop.
I tried following coide
BOOL CSignApp::InitInstance()
{

......
	// The main window has been initialized, so show and update it.
	pMainFrame->ShowWindow(m_nCmdShow);
	pMainFrame->UpdateWindow();

	MessageBox(NULL, "test", "test", IDOK);

    PostMessage(pMainFrame->;GetSafeHwnd(), WM_COMMAND, ID_FILE_NEW, (LPARAM)0);


	return TRUE;
}



I did two tests. I put "MessageBox(NULL, "test", "test", IDOK);" before and after "PostMessage(pMainFrame->GetSafeHwnd(), WM_COMMAND, ID_FILE_NEW, (LPARAM)0);"

If the MessageBox was added before PostMessage, "MessageBox" will show. After will not.

Where is the good place for sending "ID_FILE_NEW" message?

Best regards,
GeneralRe: ID_FILE_NEW causes application crashed Pin
David Crow8-Sep-09 3:55
David Crow8-Sep-09 3:55 
GeneralRe: ID_FILE_NEW causes application crashed Pin
transoft8-Sep-09 4:24
transoft8-Sep-09 4:24 
GeneralRe: ID_FILE_NEW causes application crashed Pin
David Crow8-Sep-09 4:35
David Crow8-Sep-09 4:35 
GeneralRe: ID_FILE_NEW causes application crashed [modified] Pin
transoft8-Sep-09 4:33
transoft8-Sep-09 4:33 
QuestionResize an image without a Window Pin
GeeBru7-Sep-09 10:48
GeeBru7-Sep-09 10:48 
AnswerRe: Resize an image without a Window Pin
Richard MacCutchan7-Sep-09 10:52
mveRichard MacCutchan7-Sep-09 10:52 
GeneralRe: Resize an image without a Window Pin
GeeBru7-Sep-09 10:58
GeeBru7-Sep-09 10:58 
GeneralRe: Resize an image without a Window Pin
Richard MacCutchan7-Sep-09 11:42
mveRichard MacCutchan7-Sep-09 11:42 
AnswerRe: Resize an image without a Window Pin
Stuart Dootson7-Sep-09 14:50
professionalStuart Dootson7-Sep-09 14:50 
QuestionCalling CFrameWnd::RecalcLayout causes slight flicker in left pane (CTreeView) of outlook style splitter app Pin
Sternocera7-Sep-09 9:20
Sternocera7-Sep-09 9:20 
AnswerRe: Calling CFrameWnd::RecalcLayout causes slight flicker in left pane (CTreeView) of outlook style splitter app Pin
Richard MacCutchan7-Sep-09 10:56
mveRichard MacCutchan7-Sep-09 10:56 
GeneralRe: Calling CFrameWnd::RecalcLayout causes slight flicker in left pane (CTreeView) of outlook style splitter app Pin
Sternocera7-Sep-09 11:01
Sternocera7-Sep-09 11:01 
GeneralRe: Calling CFrameWnd::RecalcLayout causes slight flicker in left pane (CTreeView) of outlook style splitter app Pin
Richard MacCutchan7-Sep-09 11:26
mveRichard MacCutchan7-Sep-09 11:26 
QuestionHow to display SSL Certificate ? Pin
Member 38346307-Sep-09 7:42
Member 38346307-Sep-09 7:42 
Questionhow to generate a static library ".lib" from a DLL? Pin
bahareh6557-Sep-09 7:38
bahareh6557-Sep-09 7:38 
AnswerRe: how to generate a static library ".lib" from a DLL? Pin
Richard MacCutchan7-Sep-09 11:45
mveRichard MacCutchan7-Sep-09 11:45 
QuestionHow to create a login form by using a database in MFC dialog based application Pin
kokilag7-Sep-09 7:15
kokilag7-Sep-09 7: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.