Click here to Skip to main content
15,903,201 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralC++ WMI Pin
torben0027-Oct-04 1:23
torben0027-Oct-04 1:23 
QuestionHow to get the path of a file in VC++ Pin
ledallam27-Oct-04 1:12
ledallam27-Oct-04 1:12 
AnswerRe: How to get the path of a file in VC++ Pin
sarath_babu27-Oct-04 1:40
sarath_babu27-Oct-04 1:40 
GeneralTwo successive dialogs in a dlg app Pin
CaesarCZ27-Oct-04 1:01
CaesarCZ27-Oct-04 1:01 
GeneralRe: Two successive dialogs in a dlg app Pin
wb27-Oct-04 1:24
wb27-Oct-04 1:24 
GeneralRe: Two successive dialogs in a dlg app Pin
CaesarCZ27-Oct-04 1:38
CaesarCZ27-Oct-04 1:38 
GeneralRe: Two successive dialogs in a dlg app Pin
wb27-Oct-04 2:14
wb27-Oct-04 2:14 
GeneralRe: Two successive dialogs in a dlg app Pin
Antony M Kancidrowski27-Oct-04 2:25
Antony M Kancidrowski27-Oct-04 2:25 
The problem you have is that you are setting the m_pMainWin to be a pointer to your first dialog.

MFC automatically terminates the thread (your application) when the window that m_pMainWnd is pointing to is closed. For further information see MSDN.

You could change the code to:
dlg = new CPoolDlg;
playoff_dlg = new CPlayoffDlg;
m_pMainWnd = playoff_dlg;

int nResponse = dlg->DoModal();

delete dlg;

nResponse = playoff_dlg->DoModal();

delete playoff_dlg;


Which will ensure that the application lives for the duration of the second dialog.

Ant.

I'm hard, yet soft.
I'm coloured, yet clear.
I'm fruity and sweet.
I'm jelly, what am I? Muse on it further, I shall return!
- David Walliams (Little Britain)

GeneralRe: Two successive dialogs in a dlg app Pin
CaesarCZ27-Oct-04 3:05
CaesarCZ27-Oct-04 3:05 
General3D Pipe Graph creation in VC++(MFC) Pin
Venkata Krishnan Naidu27-Oct-04 0:49
Venkata Krishnan Naidu27-Oct-04 0:49 
GeneralDiskQuotaControl Pin
std770227-Oct-04 0:47
std770227-Oct-04 0:47 
GeneralRe: DiskQuotaControl Pin
David Crow27-Oct-04 3:01
David Crow27-Oct-04 3:01 
GeneralRe: DiskQuotaControl Pin
std770228-Oct-04 1:34
std770228-Oct-04 1:34 
Generalactivex ctrl in modeless dialog Pin
sarath_babu27-Oct-04 0:28
sarath_babu27-Oct-04 0:28 
GeneralRe: activex ctrl in modeless dialog Pin
Cedric Moonen27-Oct-04 1:25
Cedric Moonen27-Oct-04 1:25 
Generalactivex ctrl in modeless dialog Pin
sarath_babu27-Oct-04 0:27
sarath_babu27-Oct-04 0:27 
GeneralCFile Pin
vc-programmer-26-Oct-04 22:28
vc-programmer-26-Oct-04 22:28 
GeneralRe: CFile Pin
ytod26-Oct-04 22:44
ytod26-Oct-04 22:44 
GeneralRe: CFile Pin
vc-programmer-26-Oct-04 22:59
vc-programmer-26-Oct-04 22:59 
GeneralRe: CFile Pin
vcplusplus27-Oct-04 3:10
vcplusplus27-Oct-04 3:10 
Generalimplicit pointer conversion Pin
pesho293226-Oct-04 21:55
pesho293226-Oct-04 21:55 
GeneralRe: implicit pointer conversion Pin
geo_m26-Oct-04 23:14
geo_m26-Oct-04 23:14 
GeneralRe: implicit pointer conversion Pin
pesho293227-Oct-04 0:13
pesho293227-Oct-04 0:13 
GeneralEnableWindow in vc++ Pin
vc-programmer-26-Oct-04 21:24
vc-programmer-26-Oct-04 21:24 
GeneralRe: EnableWindow in vc++ Pin
Cedric Moonen26-Oct-04 21:31
Cedric Moonen26-Oct-04 21:31 

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.