Click here to Skip to main content
15,867,756 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Load image from Resource Pin
CPallini11-May-11 1:04
mveCPallini11-May-11 1:04 
AnswerRe: Load image from Resource Pin
CPallini11-May-11 0:19
mveCPallini11-May-11 0:19 
AnswerRe: Load image from Resource Pin
Mark Salsbery11-May-11 5:08
Mark Salsbery11-May-11 5:08 
QuestionMultiple Selection in ListView. Pin
Sameerkumar Namdeo10-May-11 21:34
Sameerkumar Namdeo10-May-11 21:34 
AnswerRe: Multiple Selection in ListView. Pin
Roger Broomfield11-May-11 1:10
Roger Broomfield11-May-11 1:10 
GeneralRe: Multiple Selection in ListView. Pin
Sameerkumar Namdeo11-May-11 1:20
Sameerkumar Namdeo11-May-11 1:20 
GeneralRe: Multiple Selection in ListView. Pin
Roger Broomfield11-May-11 1:42
Roger Broomfield11-May-11 1:42 
QuestionHow about the CPropertyPage OnOK ? [modified] Pin
wangningyu10-May-11 21:28
wangningyu10-May-11 21:28 
Hello everybody !

this is a SDI Project,in the toolbar,there are two button,it used to show different dialog.
class CTestView;

void CTestView::OnShowDlgA()
{
	// TODO: Add your command handler code here
	CPropertySheet sheet(_T("TestDlgA"));
	CTestDlgA dlg;
	
	sheet.AddPage(&dlg);
	if(IDOK == sheet.DoModal())
	{
		// do something.
	}
}

void CTestView::OnShowDlgB()
{
	// TODO: Add your command handler code here
	CPropertySheet sheet(_T("TestDlgB"));
	CTestDlgB dlg;
	
	sheet.AddPage(&dlg);
	if(IDOK == sheet.DoModal())
	{
		// do something.
	}
}

class CTestDlgA : public CPropertyPage
{
	// ...
}

// add the virtual function
void CTestDlgA ::OnOK()
{
	// when is false,it will return ,and then end the dialog.
	// I don't want it closed.
	if( !SaveParams() )
		return;
	
	EndDialog(IDOK);
	//CPropertyPage::OnOK();
}

class CTestDlgB : public CPropertyPage
{
	// ...
}

// add the virtual function
void CTestDlgB ::OnOK()
{
	// usually, this dialogB doesn't closed when is false.
	// but the dialogA is closed at this.
	if( !SaveParams() )
		return;
	
	EndDialog(IDOK);
	//CPropertyPage::OnOK();
}


Why will appear this kind of circumstance?


Thanks for your reply !
Best Regards !

modified on Wednesday, May 11, 2011 3:34 AM

AnswerRe: How about the CPropertyPage OnOK ? Pin
Richard MacCutchan10-May-11 21:31
mveRichard MacCutchan10-May-11 21:31 
GeneralRe: How about the CPropertyPage OnOK ? Pin
wangningyu10-May-11 21:38
wangningyu10-May-11 21:38 
QuestionRe: How about the CPropertyPage OnOK ? Pin
Mark Salsbery11-May-11 5:17
Mark Salsbery11-May-11 5:17 
GeneralRe: How about the CPropertyPage OnOK ? Pin
David Crow11-May-11 6:07
David Crow11-May-11 6:07 
QuestionSDI and dialog communication Pin
lamrinraj10-May-11 18:33
lamrinraj10-May-11 18:33 
AnswerRe: SDI and dialog communication Pin
Hans Dietrich10-May-11 19:37
mentorHans Dietrich10-May-11 19:37 
GeneralRe: SDI and dialog communication Pin
lamrinraj10-May-11 22:47
lamrinraj10-May-11 22:47 
AnswerRe: SDI and dialog communication Pin
JohnCz14-May-11 12:03
JohnCz14-May-11 12:03 
QuestionDesign Pattern of separating data and business logic Pin
Berlus10-May-11 10:44
Berlus10-May-11 10:44 
AnswerRe: Design Pattern of separating data and business logic Pin
_AnsHUMAN_ 10-May-11 18:21
_AnsHUMAN_ 10-May-11 18:21 
AnswerRe: Design Pattern of separating data and business logic Pin
ShilpiP10-May-11 20:07
ShilpiP10-May-11 20:07 
QuestionCompletely custom Edit control Pin
csrss10-May-11 8:56
csrss10-May-11 8:56 
AnswerRe: Completely custom Edit control Pin
Chris Losinger10-May-11 9:45
professionalChris Losinger10-May-11 9:45 
GeneralRe: Completely custom Edit control Pin
csrss10-May-11 11:37
csrss10-May-11 11:37 
Questionfind diffrence between current time and birthday as a number of days. Pin
quartaela10-May-11 6:54
quartaela10-May-11 6:54 
AnswerRe: find diffrence between current time and birthday as a number of days. Pin
Chris Losinger10-May-11 7:43
professionalChris Losinger10-May-11 7:43 
GeneralRe: find diffrence between current time and birthday as a number of days. Pin
quartaela10-May-11 7:47
quartaela10-May-11 7:47 

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.