Click here to Skip to main content
15,885,216 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Question__FILE__ macro Pin
Saurabh.Garg5-Jan-06 18:28
Saurabh.Garg5-Jan-06 18:28 
AnswerRe: __FILE__ macro Pin
Sam.Liang5-Jan-06 19:01
Sam.Liang5-Jan-06 19:01 
GeneralRe: __FILE__ macro Pin
Saurabh.Garg5-Jan-06 20:42
Saurabh.Garg5-Jan-06 20:42 
QuestionCreateProcess!! Pin
manojk_batra5-Jan-06 18:03
manojk_batra5-Jan-06 18:03 
AnswerRe: CreateProcess!! Pin
Anilkumar K V5-Jan-06 18:17
Anilkumar K V5-Jan-06 18:17 
GeneralRe: CreateProcess!! Pin
manojk_batra5-Jan-06 19:37
manojk_batra5-Jan-06 19:37 
GeneralRe: CreateProcess!! Pin
ThatsAlok8-Jan-06 23:57
ThatsAlok8-Jan-06 23:57 
AnswerRe: CreateProcess!! Pin
lastgen5-Jan-06 18:46
lastgen5-Jan-06 18:46 
Make a call to the windows API command "GetWindowsDirectory" and use strcat to concatenate the notepad string to the end of it. You could just hardcode the string too (eg "C:\\Windows\\notepad.exe"), but if anyone has a custom windows install it may not find the file.

example code

<br />
char *strbuf[256];<br />
if (GetWindowsDirectory(strbuf, 256))<br />
{<br />
  strcat(strbuf, "\\notePad.exe");<br />
}<br />
else<br />
{<br />
// An error occurred, perhaps the buffer is too small?<br />
}<br />
<br />
// Now you should have the full path in the strbuf variable<br />
CreateProcess(strbuf,NULL,NULL,NULL,FALSE,NULL,NULL,NULL,&si,π);<br />
<br />


When I die I'd like to go peacefully in my sleep like my father, not screaming in terror like his passengers!!!

-- modified at 1:18 Friday 6th January, 2006
GeneralRe: CreateProcess!! Pin
manojk_batra5-Jan-06 20:29
manojk_batra5-Jan-06 20:29 
AnswerRe: CreateProcess!! Pin
Owner drawn5-Jan-06 19:01
Owner drawn5-Jan-06 19:01 
GeneralRe: CreateProcess!! Pin
manojk_batra5-Jan-06 20:33
manojk_batra5-Jan-06 20:33 
AnswerRe: CreateProcess!! Pin
sunit55-Jan-06 19:06
sunit55-Jan-06 19:06 
GeneralRe: CreateProcess!! Pin
manojk_batra5-Jan-06 20:45
manojk_batra5-Jan-06 20:45 
Questionhow can i create worker and UI thread in single application Pin
Laxman95-Jan-06 17:49
Laxman95-Jan-06 17:49 
AnswerRe: how can i create worker and UI thread in single application Pin
Anilkumar K V5-Jan-06 18:05
Anilkumar K V5-Jan-06 18:05 
QuestionHow to create an independent thread for reading data from buffer of Serial Port ??? Pin
QuangDien5-Jan-06 15:17
QuangDien5-Jan-06 15:17 
AnswerRe: How to create an independent thread for reading data from buffer of Serial Port ??? Pin
Anilkumar K V5-Jan-06 17:14
Anilkumar K V5-Jan-06 17:14 
QuestionQuick ideas for activation Pin
Alex Korchemniy5-Jan-06 14:57
Alex Korchemniy5-Jan-06 14:57 
AnswerRe: Quick ideas for activation Pin
TheGreatAndPowerfulOz5-Jan-06 20:20
TheGreatAndPowerfulOz5-Jan-06 20:20 
GeneralRe: Quick ideas for activation Pin
Sebastian Schneider5-Jan-06 20:37
Sebastian Schneider5-Jan-06 20:37 
AnswerRe: Quick ideas for activation Pin
TheGreatAndPowerfulOz5-Jan-06 20:33
TheGreatAndPowerfulOz5-Jan-06 20:33 
GeneralRe: Quick ideas for activation Pin
Alex Korchemniy6-Jan-06 7:32
Alex Korchemniy6-Jan-06 7:32 
Questionresolve crossed-bounds text Pin
s o v a n n5-Jan-06 14:51
s o v a n n5-Jan-06 14:51 
QuestionRetrofitting an MFC app to ActiveX Pin
Graham Reeds5-Jan-06 12:57
Graham Reeds5-Jan-06 12:57 
AnswerRe: Retrofitting an MFC app to ActiveX Pin
John R. Shaw5-Jan-06 13:20
John R. Shaw5-Jan-06 13:20 

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.