Click here to Skip to main content
15,902,777 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Execute unix application through VC++ Pin
Rajesh R Subramanian9-May-08 5:46
professionalRajesh R Subramanian9-May-08 5:46 
AnswerRe: Execute unix application through VC++ Pin
David Crow9-May-08 15:17
David Crow9-May-08 15:17 
Questiondestroy a dialog in a MFC application Pin
tom groezer9-May-08 2:53
tom groezer9-May-08 2:53 
AnswerRe: destroy a dialog in a MFC application Pin
Rajesh R Subramanian9-May-08 3:02
professionalRajesh R Subramanian9-May-08 3:02 
GeneralRe: destroy a dialog in a MFC application Pin
toxcct9-May-08 3:09
toxcct9-May-08 3:09 
GeneralRe: destroy a dialog in a MFC application Pin
Rajesh R Subramanian9-May-08 3:31
professionalRajesh R Subramanian9-May-08 3:31 
AnswerRe: destroy a dialog in a MFC application Pin
toxcct9-May-08 3:08
toxcct9-May-08 3:08 
AnswerRe: destroy a dialog in a MFC application Pin
tom groezer9-May-08 3:20
tom groezer9-May-08 3:20 
Below is the code the control is not coming after dlg.DoModal();

if (!CreateProcess(NULL, /* No module name (use command line). */
theApp.m_lpCmdLine, /* Command line. */
NULL, /* Process handle not inheritable. */
NULL, /* Thread handle not inheritable. */
FALSE, /* Set handle inheritance to FALSE. */
CREATE_NO_WINDOW, /* Do not display console window */
NULL, /* Use parent's environment block. */
NULL, /* Use parent's starting directory. */
&si, /* Pointer to STARTUPINFO structure. */
&pi)) /* Pointer to PROCESS_INFORMATION structure. */
status = GetLastError();

CProgressActivityDlg 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
//}

MessageBox(NULL, _T("Before loop"), _T("Test"), MB_OK);
WaitForSingleObject(pi.hProcess, INFINITE);
MessageBox(NULL, _T("Out of loop"), _T("Test"), MB_OK);

CloseHandle(pi.hProcess);
CloseHandle(pi.hThread);
PostMessageW(dlg.GetSafeHwnd(), WM_CLOSE ,0, 0);
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
AfxGetMainWnd()->PostMessage(WM_CLOSE, 0, 0);
return FALSE;
GeneralRe: destroy a dialog in a MFC application Pin
tom groezer9-May-08 3:26
tom groezer9-May-08 3:26 
GeneralRe: destroy a dialog in a MFC application Pin
Mark Salsbery9-May-08 6:15
Mark Salsbery9-May-08 6:15 
Questionfputc or fgetc returning odd results Pin
Klempie9-May-08 2:03
Klempie9-May-08 2:03 
AnswerRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 2:28
Klempie9-May-08 2:28 
GeneralRe: fputc or fgetc returning odd results Pin
Rajkumar R9-May-08 2:37
Rajkumar R9-May-08 2:37 
GeneralRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 2:40
Klempie9-May-08 2:40 
GeneralRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 2:50
Klempie9-May-08 2:50 
AnswerRe: fputc or fgetc returning odd results [modified] Pin
Rajkumar R9-May-08 3:38
Rajkumar R9-May-08 3:38 
GeneralRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 4:15
Klempie9-May-08 4:15 
GeneralRe: fputc or fgetc returning odd results Pin
Rajkumar R9-May-08 4:21
Rajkumar R9-May-08 4:21 
GeneralRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 4:28
Klempie9-May-08 4:28 
AnswerRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 4:48
Klempie9-May-08 4:48 
GeneralRe: fputc or fgetc returning odd results Pin
Rajkumar R9-May-08 5:05
Rajkumar R9-May-08 5:05 
GeneralRe: fputc or fgetc returning odd results Pin
Rajkumar R9-May-08 4:56
Rajkumar R9-May-08 4:56 
AnswerRe: fputc or fgetc returning odd results Pin
Klempie9-May-08 5:06
Klempie9-May-08 5:06 
GeneralRe: fputc or fgetc returning odd results Pin
Rajkumar R9-May-08 5:10
Rajkumar R9-May-08 5:10 
AnswerRe: fputc or fgetc returning odd results Pin
toxcct9-May-08 3:06
toxcct9-May-08 3:06 

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.