Click here to Skip to main content
15,913,939 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralSelecting Region of Interest(ROI) in images Pin
ashsri4-Dec-04 16:06
ashsri4-Dec-04 16:06 
GeneralRe: Selecting Region of Interest(ROI) in images [modified] Pin
qilujo20-Jul-09 2:13
qilujo20-Jul-09 2:13 
Generalvc60.pdb Pin
Andy H4-Dec-04 11:14
Andy H4-Dec-04 11:14 
GeneralRe: vc60.pdb Pin
ashsri4-Dec-04 15:57
ashsri4-Dec-04 15:57 
GeneralRe: vc60.pdb Pin
Andy H4-Dec-04 22:17
Andy H4-Dec-04 22:17 
GeneralRe: vc60.pdb Pin
Gary R. Wheeler5-Dec-04 10:06
Gary R. Wheeler5-Dec-04 10:06 
Generalinterchanging between two dialog boxes Pin
haseeb_saeed4-Dec-04 10:34
haseeb_saeed4-Dec-04 10:34 
GeneralRe: interchanging between two dialog boxes Pin
John R. Shaw4-Dec-04 11:35
John R. Shaw4-Dec-04 11:35 
I hope you did not write it as shown in this post. The idea I gave you should have worked, here is a rewrite (of an dialog-app InitInstance fuction):
BOOL CVeryTemporaryApp::InitInstance()
{
	AfxEnableControlContainer();

	// Standard initialization
	// If you are not using these features and wish to reduce the size
	//  of your final executable, you should remove from the following
	//  the specific initialization routines you do not need.

#ifdef _AFXDLL
	Enable3dControls();			// Call this when using MFC in a shared DLL
#else
	Enable3dControlsStatic();	// Call this when linking to MFC statically
#endif

	int nResponse = IDD_NORMAL;
	while (nResponse == IDD_NORMAL || nResponse == IDD_SPECIAL)
	{
		{ // probably required
			CVeryTemporaryDlg dlg((UINT)nResponse);
			m_pMainWnd = &dlg; // make dlg main window
			nResponse = dlg.DoModal(); // show dlg
		} // dlg is destoyed here, when scope changes
	}

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


In the above example: the response from DoModal() should be IDOK, IDCANCEL, IDD_NORMAL or IDD_SPECIAL, anthing else is invalid.

As for EndDialog(IDD_SPECIAL), this causes dlg. DoModal() to return IDD_SPECIAL as the response code.


INTP
"The more help VB provides VB programmers, the more miserable your life as a C++ programmer becomes."
Andrew W. Troelsen
Questionhow to control program execution speed Pin
Mohammad A Gdeisat4-Dec-04 9:16
Mohammad A Gdeisat4-Dec-04 9:16 
AnswerRe: how to control program execution speed Pin
Stanciu Vlad4-Dec-04 9:37
Stanciu Vlad4-Dec-04 9:37 
AnswerRe: how to control program execution speed Pin
John R. Shaw4-Dec-04 10:34
John R. Shaw4-Dec-04 10:34 
GeneralRe: how to control program execution speed Pin
Mohammad A Gdeisat5-Dec-04 5:43
Mohammad A Gdeisat5-Dec-04 5:43 
GeneralRe: how to control program execution speed Pin
David Crow6-Dec-04 3:08
David Crow6-Dec-04 3:08 
GeneralRe: how to control program execution speed Pin
Mohammad A Gdeisat6-Dec-04 9:31
Mohammad A Gdeisat6-Dec-04 9:31 
GeneralRe: how to control program execution speed Pin
David Crow6-Dec-04 9:39
David Crow6-Dec-04 9:39 
GeneralRegistering file type and icon Pin
SloanCode4-Dec-04 7:40
SloanCode4-Dec-04 7:40 
GeneralRe: Registering file type and icon Pin
Michael Dunn4-Dec-04 9:01
sitebuilderMichael Dunn4-Dec-04 9:01 
GeneralUser Interface - Advice Required Pin
Imtiaz Murtaza4-Dec-04 7:27
Imtiaz Murtaza4-Dec-04 7:27 
GeneralRe: User Interface - Advice Required Pin
Maximilien4-Dec-04 8:49
Maximilien4-Dec-04 8:49 
GeneralRe: User Interface - Advice Required Pin
toddbrooks4-Dec-04 9:37
toddbrooks4-Dec-04 9:37 
GeneralRe: User Interface - Advice Required Pin
peterchen5-Dec-04 0:36
peterchen5-Dec-04 0:36 
GeneralRe: User Interface - Advice Required Pin
Tareq Ahmed Siraj5-Dec-04 5:26
Tareq Ahmed Siraj5-Dec-04 5:26 
GeneralRe: User Interface - Advice Required Pin
Henry miller6-Dec-04 6:50
Henry miller6-Dec-04 6:50 
GeneralOninitUpdate Pin
jimjake4-Dec-04 4:01
jimjake4-Dec-04 4:01 
GeneralRe: OninitUpdate Pin
Ravi Bhavnani4-Dec-04 6:00
professionalRavi Bhavnani4-Dec-04 6:00 

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.