Click here to Skip to main content
16,005,697 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: close an application Pin
Stephen Hewitt13-Jun-07 14:26
Stephen Hewitt13-Jun-07 14:26 
GeneralRe: close an application Pin
Russell'13-Jun-07 22:57
Russell'13-Jun-07 22:57 
GeneralRe: close an application Pin
David Crow14-Jun-07 2:31
David Crow14-Jun-07 2:31 
AnswerRe: close an application Pin
Jhony george13-Jun-07 1:01
Jhony george13-Jun-07 1:01 
GeneralRe: close an application Pin
Russell'13-Jun-07 1:21
Russell'13-Jun-07 1:21 
AnswerRe: close an application Pin
Hamid_RT13-Jun-07 3:40
Hamid_RT13-Jun-07 3:40 
GeneralRe: close an application Pin
Russell'13-Jun-07 3:45
Russell'13-Jun-07 3:45 
GeneralRe: close an application Pin
Russell'13-Jun-07 3:53
Russell'13-Jun-07 3:53 
That is the problem:
// Fill the structure
SHELLEXECUTEINFO ShellExecuteInfo;
ShellExecuteInfo.cbSize = sizeof(SHELLEXECUTEINFO);
ShellExecuteInfo.fMask = SEE_MASK_NOCLOSEPROCESS;
ShellExecuteInfo.hwnd = NULL;
ShellExecuteInfo.lpVerb = NULL;
ShellExecuteInfo.lpFile = "notepad.exe";
ShellExecuteInfo.lpParameters = "";
ShellExecuteInfo.lpDirectory = NULL;
ShellExecuteInfo.nShow = SW_SHOW;
ShellExecuteInfo.hInstApp = NULL;

// Open the application
ShellExecuteEx(&ShellExecuteInfo);

// Wait some seconds
Sleep(10000);

// Terminate the process
::SendMessage(ShellExecuteInfo.hwnd, WM_CLOSE, NULL, NULL);


It doesn't' work...Sigh | :sigh:



Russell

GeneralRe: close an application Pin
Hamid_RT13-Jun-07 9:01
Hamid_RT13-Jun-07 9:01 
GeneralRe: close an application Pin
Hamid_RT13-Jun-07 8:59
Hamid_RT13-Jun-07 8:59 
Questionhelp with WM_KEYDOWN Pin
Sam Rens12-Jun-07 21:50
Sam Rens12-Jun-07 21:50 
AnswerRe: help with WM_KEYDOWN Pin
Nelek12-Jun-07 23:28
protectorNelek12-Jun-07 23:28 
GeneralRe: help with WM_KEYDOWN Pin
Sam Rens13-Jun-07 0:16
Sam Rens13-Jun-07 0:16 
GeneralRe: help with WM_KEYDOWN Pin
Nelek13-Jun-07 7:36
protectorNelek13-Jun-07 7:36 
QuestionVC++ Pin
srinivasa phani kiran12-Jun-07 21:47
srinivasa phani kiran12-Jun-07 21:47 
AnswerRe: VC++ Pin
Naveen12-Jun-07 21:57
Naveen12-Jun-07 21:57 
AnswerRe: VC++ Pin
Nelek12-Jun-07 23:25
protectorNelek12-Jun-07 23:25 
QuestionGDI & Image Processing Pin
KienNT7812-Jun-07 21:05
KienNT7812-Jun-07 21:05 
AnswerRe: GDI & Image Processing Pin
CPallini12-Jun-07 21:23
mveCPallini12-Jun-07 21:23 
AnswerRe: GDI & Image Processing Pin
Nelek12-Jun-07 23:22
protectorNelek12-Jun-07 23:22 
Questionproblem in file open dialog box Pin
trioum12-Jun-07 20:57
trioum12-Jun-07 20:57 
AnswerRe: problem in file open dialog box Pin
Hamid_RT12-Jun-07 21:30
Hamid_RT12-Jun-07 21:30 
AnswerRe: problem in file open dialog box Pin
trioum13-Jun-07 1:26
trioum13-Jun-07 1:26 
GeneralRe: problem in file open dialog box Pin
Hamid_RT13-Jun-07 3:34
Hamid_RT13-Jun-07 3:34 
QuestionUsing OpenGL Text Output with DIB Section Pin
beko12-Jun-07 20:37
beko12-Jun-07 20:37 

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.