Click here to Skip to main content
15,886,919 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: open file dialog Pin
Viorel.4-Jun-06 20:53
Viorel.4-Jun-06 20:53 
QuestionShow struct contents in Notepad Pin
RajiRaghu4-Jun-06 19:33
RajiRaghu4-Jun-06 19:33 
AnswerRe: Show struct contents in Notepad Pin
_AnsHUMAN_ 4-Jun-06 19:43
_AnsHUMAN_ 4-Jun-06 19:43 
GeneralRe: Show struct contents in Notepad Pin
RajiRaghu4-Jun-06 19:51
RajiRaghu4-Jun-06 19:51 
GeneralRe: Show struct contents in Notepad Pin
ThatsAlok4-Jun-06 19:56
ThatsAlok4-Jun-06 19:56 
GeneralRe: Show struct contents in Notepad Pin
RajiRaghu4-Jun-06 20:00
RajiRaghu4-Jun-06 20:00 
GeneralRe: Show struct contents in Notepad Pin
ThatsAlok4-Jun-06 20:38
ThatsAlok4-Jun-06 20:38 
GeneralRe: Show struct contents in Notepad Pin
FarPointer4-Jun-06 20:59
FarPointer4-Jun-06 20:59 
Hi ,
Check this out :-
Taken From Jeff Prosise:-

Sometimes the need arises to launch a process and delay just long enough to make sure the process is started and responding to user input. If process A launches process B and process B creates a window, for example, and process A wants to send that window a message, process A might have to wait for a moment after ::CreateProcess returns to give process B time to create a window and begin processing messages. This problem is easily solved with the Win32 ::WaitForInputIdle function:

STARTUPINFO si;
::ZeroMemory (&si, sizeof (STARTUPINFO));
si.cb = sizeof (STARTUPINFO);
PROCESS_INFORMATION pi;

if (::CreateProcess (NULL, _T ("C:\\Windows\\Notepad"), NULL,
NULL, FALSE, NORMAL_PRIORITY_CLASS, NULL, NULL, &si, &pi)) {
::CloseHandle (pi.hThread);
::WaitForInputIdle (pi.hProcess, INFINITE);
// Get B's window handle and send or post a message.
::CloseHandle (pi.hProcess);
}




::WaitForInputIdle suspends the current process until the specified process begins processing messages and empties its message queue. I didn't show the code to find the window handle because there isn't a simple MFC or API function you can call to convert a process handle into a window handle. Instead, you must use ::EnumWindows, ::FindWindow, or a related function to search for the window based on some known characteristic of the owning process.


Regards,
FarPointer
GeneralRe: Show struct contents in Notepad Pin
RajiRaghu4-Jun-06 21:47
RajiRaghu4-Jun-06 21:47 
GeneralRe: Show struct contents in Notepad Pin
ThatsAlok4-Jun-06 22:11
ThatsAlok4-Jun-06 22:11 
GeneralRe: Show struct contents in Notepad Pin
Hamid_RT4-Jun-06 22:17
Hamid_RT4-Jun-06 22:17 
GeneralRe: Show struct contents in Notepad Pin
RajiRaghu4-Jun-06 22:56
RajiRaghu4-Jun-06 22:56 
AnswerRe: Show struct contents in Notepad Pin
_AnsHUMAN_ 4-Jun-06 20:38
_AnsHUMAN_ 4-Jun-06 20:38 
QuestionEvent Viewer Pin
ashokvishnu4-Jun-06 19:26
ashokvishnu4-Jun-06 19:26 
AnswerRe: Event Viewer Pin
Anilkumar K V5-Jun-06 0:40
Anilkumar K V5-Jun-06 0:40 
GeneralRe: Event Viewer Pin
ashokvishnu5-Jun-06 1:09
ashokvishnu5-Jun-06 1:09 
AnswerRe: Event Viewer Pin
Blake Miller6-Jun-06 5:16
Blake Miller6-Jun-06 5:16 
QuestionSignificance of MFC/.NET Pin
Nattack4-Jun-06 18:18
Nattack4-Jun-06 18:18 
AnswerRe: Significance of MFC/.NET [modified] Pin
_AnsHUMAN_ 4-Jun-06 19:28
_AnsHUMAN_ 4-Jun-06 19:28 
GeneralRe: Significance of MFC/.NET [modified] Pin
Tara144-Jun-06 22:05
Tara144-Jun-06 22:05 
GeneralRe: Significance of MFC/.NET [modified] Pin
_AnsHUMAN_ 4-Jun-06 22:12
_AnsHUMAN_ 4-Jun-06 22:12 
GeneralRe: Significance of MFC/.NET [modified] Pin
Tara144-Jun-06 22:16
Tara144-Jun-06 22:16 
QuestionHelp Needed! Pin
fury 844-Jun-06 17:00
fury 844-Jun-06 17:00 
AnswerRe: Help Needed! [modified] Pin
bob169724-Jun-06 17:21
bob169724-Jun-06 17:21 
AnswerRe: Help Needed! Pin
Christian Graus4-Jun-06 18:05
protectorChristian Graus4-Jun-06 18:05 

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.