Click here to Skip to main content
15,881,938 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: GEt path of msi Pin
Narendra Reddy Vajrala18-Jun-09 5:17
Narendra Reddy Vajrala18-Jun-09 5:17 
Questiondialog window Pin
durban210-Apr-09 21:11
durban210-Apr-09 21:11 
AnswerRe: dialog window Pin
Rajesh R Subramanian10-Apr-09 21:26
professionalRajesh R Subramanian10-Apr-09 21:26 
QuestionUnderstanding GetUserObjectSecurity function Pin
rbwest8610-Apr-09 21:09
rbwest8610-Apr-09 21:09 
AnswerRe: Understanding GetUserObjectSecurity function (warning: long reply) Pin
Rajesh R Subramanian10-Apr-09 22:28
professionalRajesh R Subramanian10-Apr-09 22:28 
QuestionResource DLL Pin
Varun Bhatt10-Apr-09 21:01
Varun Bhatt10-Apr-09 21:01 
AnswerRe: Resource DLL Pin
«_Superman_»11-Apr-09 20:58
professional«_Superman_»11-Apr-09 20:58 
AnswerWhy does my property sheet has disappeared immediately? [solved] Pin
PCuong198310-Apr-09 18:35
professionalPCuong198310-Apr-09 18:35 
I have a dialog based application named: basicreport
and created
one dialog called: CExternalDataDlg ,
3 property page called: CImportPage, COptionPage, CConfirmPage
and 1 property sheet named: CImportPropertySheet.

inside: BOOL CBasicReportApp::InitInstance()

 BOOL CBasicReportApp::InitInstance(){
......
        CExternalDataDlg dlg;
	m_pMainWnd = &dlg;
	INT_PTR nResponse = dlg.DoModal();
	if (nResponse == IDOK)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with OK
		
	}
	else if (nResponse == IDCANCEL)
	{
		// TODO: Place code here to handle when the dialog is
		//  dismissed with Cancel
		
	}
        return FALSE;
}

CExternalDataDlg displayed correctly, worked fine!
I have change above code to:
 BOOL CBasicReportApp::InitInstance(){
        ......
        CImportPropertySheet importWizardSheet(_T("Import Spreadsheet Wizard"));
	CImportPage importpage;
	COptionPage optionpage;
	CConfirmPage confirmpage;

	importWizardSheet.AddPage(&importpage);
	importWizardSheet.AddPage(&optionpage);
	importWizardSheet.AddPage(&confirmpage);
	importWizardSheet.SetWizardMode();
	

	m_pMainWnd = &importWizardSheet;

	INT_PTR nWizardResponse = importWizardSheet.DoModal();
	if(nWizardResponse == ID_WIZFINISH){
		AfxMessageBox(_T("Importing..........."));
	}
	else if(nWizardResponse == IDCANCEL){
		AfxMessageBox(_T("Cancel"));
	}
	else{
	}
        return FALSE;
}

CImportPropertySheet displayed correctly, worked fine!
but when i combinated the both above into once. It looked like
    CExternalDataDlg dlg;
m_pMainWnd = &dlg;
INT_PTR nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
    // TODO: Place code here to handle when the dialog is
    //  dismissed with OK
    CImportPropertySheet importWizardSheet(_T("Import Spreadsheet Wizard"));
    CImportPage importpage;
    COptionPage optionpage;
    CConfirmPage confirmpage;

    importWizardSheet.AddPage(&importpage);
    importWizardSheet.AddPage(&optionpage);
    importWizardSheet.AddPage(&confirmpage);
    importWizardSheet.SetWizardMode();

    INT_PTR nWizardResponse = importWizardSheet.DoModal();
    if(nWizardResponse == ID_WIZFINISH){
        AfxMessageBox(_T("Importing..........."));
    }
    else if(nWizardResponse == IDCANCEL){
        AfxMessageBox(_T("Cancel"));
    }
    else{
    }
}
else if (nResponse == IDCANCEL)
{
    // TODO: Place code here to handle when the dialog is
    //  dismissed with Cancel
    return FALSE;
}

// Since the dialog has been closed, return FALSE so that we exit the
//  application, rather than start the application's message pump.
return FALSE;


The ExternalDataDlg displayed, when i press OK button on ExternalDataDlg the CImportPropertySheet blink and the immediately disappear without any action by user.

i dont know why? Please kindly advise

modified on Saturday, April 11, 2009 9:16 AM

QuestionImage::GetThumbnailImage problem Pin
followait10-Apr-09 15:46
followait10-Apr-09 15:46 
Questionmicrocontroller coding Pin
vikram868610-Apr-09 13:04
vikram868610-Apr-09 13:04 
AnswerRe: microcontroller coding Pin
Garth J Lancaster10-Apr-09 14:23
professionalGarth J Lancaster10-Apr-09 14:23 
Questionsudoku runtime error help please !!!!! Pin
tayyyar10-Apr-09 11:14
tayyyar10-Apr-09 11:14 
AnswerRe: sudoku runtime error help please !!!!! Pin
Luc 64801110-Apr-09 11:48
Luc 64801110-Apr-09 11:48 
AnswerRe: sudoku runtime error help please !!!!! Pin
Garth J Lancaster10-Apr-09 14:27
professionalGarth J Lancaster10-Apr-09 14:27 
AnswerRe: sudoku runtime error help please !!!!! Pin
Maximilien10-Apr-09 15:04
Maximilien10-Apr-09 15:04 
QuestionRe: sudoku runtime error help please !!!!! Pin
David Crow10-Apr-09 17:12
David Crow10-Apr-09 17:12 
AnswerRe: sudoku runtime error help please !!!!! [modified] Pin
tayyyar10-Apr-09 17:59
tayyyar10-Apr-09 17:59 
GeneralRe: sudoku runtime error help please !!!!! Pin
Cedric Moonen10-Apr-09 22:09
Cedric Moonen10-Apr-09 22:09 
GeneralRe: sudoku runtime error help please !!!!! Pin
tayyyar11-Apr-09 1:35
tayyyar11-Apr-09 1:35 
GeneralRe: sudoku runtime error help please !!!!! Pin
David Crow13-Apr-09 3:28
David Crow13-Apr-09 3:28 
QuestionRe: sudoku runtime error help please !!!!! Pin
David Crow13-Apr-09 3:32
David Crow13-Apr-09 3:32 
AnswerRe: sudoku runtime error help please !!!!! Pin
Sauce!12-Apr-09 6:03
Sauce!12-Apr-09 6:03 
Questionhow to control Stepper Motor Control driver through serial Port Pin
sahih10-Apr-09 6:01
sahih10-Apr-09 6:01 
AnswerRe: how to control Stepper Motor Control driver through serial Port Pin
CPallini10-Apr-09 6:49
mveCPallini10-Apr-09 6:49 
AnswerRe: how to control Stepper Motor Control driver through serial Port Pin
Rajesh R Subramanian11-Apr-09 0:15
professionalRajesh R Subramanian11-Apr-09 0: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.