Click here to Skip to main content
15,890,825 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Removing the MS-DOS stub from a PE File Pin
iNoble12-Apr-09 11:36
iNoble12-Apr-09 11:36 
GeneralRe: Removing the MS-DOS stub from a PE File Pin
Baltoro13-Apr-09 5:55
Baltoro13-Apr-09 5:55 
Questionneed help.. [modified] Pin
badboyz8911-Apr-09 7:31
badboyz8911-Apr-09 7:31 
AnswerRe: need help.. Pin
CARPETBURNER12-Apr-09 0:06
CARPETBURNER12-Apr-09 0:06 
Questionwho can share the code to intercept iexplore connect send recv closesocket Pin
ernst2002053011-Apr-09 5:19
ernst2002053011-Apr-09 5:19 
AnswerRe: who can share the code to intercept iexplore connect send recv closesocket Pin
Green Fuze11-Apr-09 20:00
Green Fuze11-Apr-09 20:00 
News[ANN] Announcement: NUI C++ multi-platform appllication framework, 3D hardware GUI [modified] Pin
meelooo11-Apr-09 0:17
meelooo11-Apr-09 0:17 
GeneralRe: [ANN] Announcement: NUI C++ multi-platform appllication framework, 3D hardware GUI Pin
Rajesh R Subramanian11-Apr-09 0:20
professionalRajesh R Subramanian11-Apr-09 0:20 
GeneralRe: [ANN] Announcement: NUI C++ multi-platform appllication framework, 3D hardware GUI Pin
meelooo11-Apr-09 0:26
meelooo11-Apr-09 0:26 
GeneralRe: [ANN] Announcement: NUI C++ multi-platform appllication framework, 3D hardware GUI Pin
Rajesh R Subramanian11-Apr-09 0:31
professionalRajesh R Subramanian11-Apr-09 0:31 
QuestionGEt path of msi Pin
p_196010-Apr-09 23:46
p_196010-Apr-09 23:46 
AnswerRe: GEt path of msi Pin
Rajesh R Subramanian10-Apr-09 23:51
professionalRajesh R Subramanian10-Apr-09 23:51 
GeneralRe: GEt path of msi Pin
p_196010-Apr-09 23:53
p_196010-Apr-09 23:53 
GeneralRe: GEt path of msi Pin
Rajesh R Subramanian11-Apr-09 0:23
professionalRajesh R Subramanian11-Apr-09 0:23 
GeneralRe: GEt path of msi Pin
p_196011-Apr-09 1:04
p_196011-Apr-09 1:04 
GeneralRe: GEt path of msi Pin
Rajesh R Subramanian11-Apr-09 3:31
professionalRajesh R Subramanian11-Apr-09 3:31 
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 

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.