Click here to Skip to main content
15,897,891 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Strings in the code Pin
Iain Clarke, Warrior Programmer7-Sep-09 21:03
Iain Clarke, Warrior Programmer7-Sep-09 21:03 
GeneralRe: Strings in the code Pin
Michael Schubert7-Sep-09 22:30
Michael Schubert7-Sep-09 22:30 
AnswerRe: Strings in the code Pin
CPallini7-Sep-09 21:10
mveCPallini7-Sep-09 21:10 
AnswerRe: Strings in the code Pin
Michael Schubert7-Sep-09 22:34
Michael Schubert7-Sep-09 22:34 
QuestionClosing of dialog box crashes application Pin
Le@rner7-Sep-09 18:12
Le@rner7-Sep-09 18:12 
AnswerRe: Closing of dialog box crashes application Pin
theCPkid7-Sep-09 18:31
theCPkid7-Sep-09 18:31 
GeneralRe: Closing of dialog box crashes application Pin
Le@rner7-Sep-09 18:34
Le@rner7-Sep-09 18:34 
QuestionSet the text of spincontrol( Updown control) using sendmessage Pin
Bedke7-Sep-09 18:07
Bedke7-Sep-09 18:07 
AnswerRe: Set the text of spincontrol( Updown control) using sendmessage Pin
Selvam R8-Sep-09 0:20
professionalSelvam R8-Sep-09 0:20 
GeneralRe: Set the text of spincontrol( Updown control) using sendmessage Pin
Bedke8-Sep-09 0:25
Bedke8-Sep-09 0:25 
QuestionSetWindowPos API doubt Pin
theCPkid7-Sep-09 15:47
theCPkid7-Sep-09 15:47 
AnswerRe: SetWindowPos API doubt Pin
«_Superman_»7-Sep-09 16:01
professional«_Superman_»7-Sep-09 16:01 
QuestionOverloading cast & assignment not enough for ==? Pin
dplong7-Sep-09 11:22
dplong7-Sep-09 11:22 
QuestionRe: Overloading cast & assignment not enough for ==? Pin
CPallini7-Sep-09 11:54
mveCPallini7-Sep-09 11:54 
AnswerRe: Overloading cast & assignment not enough for ==? Pin
dplong7-Sep-09 12:30
dplong7-Sep-09 12:30 
AnswerRe: Overloading cast & assignment not enough for ==? Pin
Stuart Dootson7-Sep-09 14:41
professionalStuart Dootson7-Sep-09 14:41 
QuestionRe: Overloading cast & assignment not enough for ==? [modified] Pin
dplong7-Sep-09 18:39
dplong7-Sep-09 18:39 
QuestionWhy do functions in the C library have short names? Pin
0x3c07-Sep-09 10:58
0x3c07-Sep-09 10:58 
AnswerRe: Why do functions in the C library have short names? Pin
CPallini7-Sep-09 11:13
mveCPallini7-Sep-09 11:13 
AnswerRe: Why do functions in the C library have short names? Pin
dplong7-Sep-09 11:32
dplong7-Sep-09 11:32 
AnswerRe: Why do functions in the C library have short names? Pin
Richard MacCutchan7-Sep-09 11:33
mveRichard MacCutchan7-Sep-09 11:33 
AnswerRe: Why do functions in the C library have short names? Pin
Stuart Dootson7-Sep-09 14:45
professionalStuart Dootson7-Sep-09 14:45 
QuestionID_FILE_NEW causes application crashed [modified] Pin
transoft7-Sep-09 10:58
transoft7-Sep-09 10:58 
Hi
I want to run a dialog box doing some setting before I open a new MDI child. I did following:
BOOL CMyApp::InitInstance()
{
....

    // Don't display a new MDI child window during startup
    if( cmdInfo.m_nShellCommand == CCommandLineInfo::FileNew )
        cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing;
....
	pMainFrame->ShowWindow(m_nCmdShow);
	pMainFrame->UpdateWindow();

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

	return TRUE;
}

void CMainFrame::CMFileNewSetting()
{
////run dialog
   PostMessage( WM_COMMAND, ID_FILE_NEW, (LPARAM)0);
.....
}


The code runs OK while I try to launch the app within the VisualStudio. But when I tried to run the App.exe, App.exe crashed. After debugging, I found out that "PostMessage( WM_COMMAND, ID_FILE_NEW, (LPARAM)0);" cause the App.exe crashed.

How can I correct this problem?

Best regards,

modified on Monday, September 7, 2009 5:13 PM

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 

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.