Click here to Skip to main content
16,006,001 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: convert finction for 'unsigned char' to 'char *' Pin
With_problem10-Dec-06 18:30
With_problem10-Dec-06 18:30 
GeneralRe: convert finction for 'unsigned char' to 'char *' Pin
Nibu babu thomas10-Dec-06 18:07
Nibu babu thomas10-Dec-06 18:07 
GeneralRe: convert finction for 'unsigned char' to 'char *' Pin
David Crow11-Dec-06 4:09
David Crow11-Dec-06 4:09 
Questionhow to recover deleted msg from outlook express Pin
naveen padiyar10-Dec-06 17:37
naveen padiyar10-Dec-06 17:37 
Questionbitblt Cpu consumption Pin
Vissu8910-Dec-06 17:35
Vissu8910-Dec-06 17:35 
AnswerRe: bitblt Cpu consumption Pin
Mark Salsbery10-Dec-06 18:17
Mark Salsbery10-Dec-06 18:17 
GeneralRe: bitblt Cpu consumption Pin
Vissu8910-Dec-06 19:34
Vissu8910-Dec-06 19:34 
QuestionCreateProcess problem Pin
poda10-Dec-06 16:50
poda10-Dec-06 16:50 
Hi Friends,
I need to invoke a .exe file and pass a message to that file.
Using CreateProcess,I invoked(called) the exe file, FindWindow API to
get the invoked exe and SendMessage to send the message.
The problem is, there is a time delay in CreateProcess that the
FindWindow API cannot find it,if WaitForSingleObject() function is not used.
<br />
CreateProcess("C:\\Bin\\wfp.exe",NULL,0,0,FALSE,CREATE_NEW_CONSOLE,0,0,&si,&pi);<br />
WaitForSingleObject(pi.hThread,500);//delay time 500ms		<br />
CloseHandle(pi.hProcess);<br />
<br />
hExeWnd=FindWindow(NULL,"WFP");<br />
if(hExeWnd)<br />
{<br />
   ::SendMessage(hExeWnd,WM_PLOTWAVE,0,0);<br />
   ShowWindow(hExeWnd,SW_SHOW);<br />
}<br />

The delay time 500ms may vary from machine to machine in accordance with its
performance.If I give it as INFINITE,the program stops there UNTILL the wfp.exe window is CLOSED,which is unacceptable.
So how can I make the program to wait untill the CreateProcess() completes its
task in executing the exe.

NOTE:I tried using ShellExecute API,but there too Sleep() function is needed for the time delay.
AnswerRe: CreateProcess problem Pin
Michael Dunn10-Dec-06 17:08
sitebuilderMichael Dunn10-Dec-06 17:08 
GeneralRe: CreateProcess problem Pin
poda10-Dec-06 19:52
poda10-Dec-06 19:52 
AnswerRe: CreateProcess problem Pin
Naveen10-Dec-06 17:11
Naveen10-Dec-06 17:11 
GeneralRe: CreateProcess problem Pin
poda10-Dec-06 19:42
poda10-Dec-06 19:42 
GeneralRe: CreateProcess problem Pin
Naveen10-Dec-06 19:46
Naveen10-Dec-06 19:46 
GeneralRe: CreateProcess problem Pin
poda10-Dec-06 21:30
poda10-Dec-06 21:30 
QuestionWindows Clipboard Format Pin
Jeffrey Walton10-Dec-06 16:38
Jeffrey Walton10-Dec-06 16:38 
AnswerRe: Windows Clipboard Format Pin
Michael Dunn10-Dec-06 17:09
sitebuilderMichael Dunn10-Dec-06 17:09 
GeneralRe: Windows Clipboard Format Pin
Jeffrey Walton10-Dec-06 17:27
Jeffrey Walton10-Dec-06 17:27 
GeneralRe: Windows Clipboard Format Pin
Jeffrey Walton10-Dec-06 17:30
Jeffrey Walton10-Dec-06 17:30 
GeneralRe: Windows Clipboard Format Pin
Jeffrey Walton10-Dec-06 17:50
Jeffrey Walton10-Dec-06 17:50 
QuestionWhich function called when drop file on Exe Pin
rp_suman10-Dec-06 13:54
rp_suman10-Dec-06 13:54 
AnswerRe: Which function called when drop file on Exe Pin
Michael Dunn10-Dec-06 14:27
sitebuilderMichael Dunn10-Dec-06 14:27 
GeneralRe: Which function called when drop file on Exe Pin
rp_suman10-Dec-06 14:42
rp_suman10-Dec-06 14:42 
GeneralRe: Which function called when drop file on Exe Pin
Michael Dunn10-Dec-06 14:47
sitebuilderMichael Dunn10-Dec-06 14:47 
GeneralThanks Pin
rp_suman10-Dec-06 14:52
rp_suman10-Dec-06 14:52 
QuestionHow coding to FrontMic setting in Mixer? Pin
boy21c10-Dec-06 12:59
boy21c10-Dec-06 12:59 

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.