Click here to Skip to main content
15,912,312 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionDynamically Resize the DialogBox when Dragged Pin
kiran janaswamy17-Apr-06 21:25
kiran janaswamy17-Apr-06 21:25 
AnswerRe: Dynamically Resize the DialogBox when Dragged Pin
Hamid_RT17-Apr-06 21:34
Hamid_RT17-Apr-06 21:34 
AnswerRe: Dynamically Resize the DialogBox when Dragged Pin
Eytukan17-Apr-06 21:55
Eytukan17-Apr-06 21:55 
AnswerRe: Dynamically Resize the DialogBox when Dragged Pin
David Crow18-Apr-06 2:52
David Crow18-Apr-06 2:52 
Questionexternal program Pin
MrChefman17-Apr-06 21:25
MrChefman17-Apr-06 21:25 
AnswerRe: external program Pin
Stephen Hewitt17-Apr-06 21:29
Stephen Hewitt17-Apr-06 21:29 
AnswerRe: external program Pin
Hamid_RT17-Apr-06 21:33
Hamid_RT17-Apr-06 21:33 
GeneralRe: external program Pin
Stephen Hewitt17-Apr-06 21:54
Stephen Hewitt17-Apr-06 21:54 
To complete this example:

\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\
PROCESS_INFORMATION l_ProcessInfo;
STARTUPINFO l_StartupInfo;

ZeroMemory(&l_StartupInfo, sizeof(STARTUPINFO));

l_StartupInfo.cb = sizeof(STARTUPINFO);
l_StartupInfo.dwFlags = STARTF_USESHOWWINDOW;
l_StartupInfo.wShowWindow = SW_SHOWMAXIMIZED;

if ( CreateProcess(NULL,
"Notepad.exe",
NULL,
NULL,
FALSE,
0,
NULL,
NULL,
&l_StartupInfo,
&l_ProcessInfo))
{
CloseHandle(l_ProcessInfo.hThread);
WaitForSingleObject(l_ProcessInfo.hProcess, INFINITE); // Wait for it to finish.
CloseHandle(l_ProcessInfo.hProcess);
}
\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\/\

Forgetting to close the handles is a common source of resource leaks.


Steve
GeneralRe: external program Pin
Hamid_RT17-Apr-06 22:01
Hamid_RT17-Apr-06 22:01 
GeneralRe: external program Pin
MrChefman17-Apr-06 22:31
MrChefman17-Apr-06 22:31 
GeneralRe: external program Pin
Le Thanh Cong17-Apr-06 23:23
Le Thanh Cong17-Apr-06 23:23 
GeneralRe: external program Pin
Branislav17-Apr-06 23:40
Branislav17-Apr-06 23:40 
AnswerRe: external program Pin
David Crow18-Apr-06 2:54
David Crow18-Apr-06 2:54 
GeneralRe: external program Pin
MrChefman20-Apr-06 5:03
MrChefman20-Apr-06 5:03 
QuestionRe: external program Pin
David Crow20-Apr-06 5:13
David Crow20-Apr-06 5:13 
Questionclient app -- web app communication? Pin
Peter Weyzen17-Apr-06 21:24
Peter Weyzen17-Apr-06 21:24 
AnswerRe: client app -- web app communication? Pin
ThatsAlok18-Apr-06 7:42
ThatsAlok18-Apr-06 7:42 
GeneralRe: client app -- web app communication? Pin
Peter Weyzen18-Apr-06 8:36
Peter Weyzen18-Apr-06 8:36 
GeneralRe: client app -- web app communication? Pin
ThatsAlok18-Apr-06 18:23
ThatsAlok18-Apr-06 18:23 
GeneralRe: client app -- web app communication? Pin
Peter Weyzen18-Apr-06 19:26
Peter Weyzen18-Apr-06 19:26 
Questiona problem on threads Pin
keerthikaaa17-Apr-06 21:15
keerthikaaa17-Apr-06 21:15 
AnswerRe: a problem on threads Pin
Parthiban17-Apr-06 21:23
Parthiban17-Apr-06 21:23 
GeneralRe: a problem on threads Pin
keerthikaaa17-Apr-06 21:29
keerthikaaa17-Apr-06 21:29 
GeneralRe: a problem on threads Pin
Stephen Hewitt17-Apr-06 21:35
Stephen Hewitt17-Apr-06 21:35 
AnswerRe: a problem on threads Pin
Stephen Hewitt17-Apr-06 21:25
Stephen Hewitt17-Apr-06 21:25 

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.