Click here to Skip to main content
15,889,820 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: let rename file just after it creation in explorer Pin
MrKBA5-Oct-09 6:23
MrKBA5-Oct-09 6:23 
QuestionChanging the color of a button [modified] Pin
ratprita4-Oct-09 22:44
ratprita4-Oct-09 22:44 
AnswerRe: Changing the color of a button Pin
CPallini4-Oct-09 23:03
mveCPallini4-Oct-09 23:03 
GeneralRe: Changing the color of a button Pin
ratprita4-Oct-09 23:44
ratprita4-Oct-09 23:44 
GeneralRe: Changing the color of a button Pin
CPallini5-Oct-09 0:18
mveCPallini5-Oct-09 0:18 
AnswerRe: Changing the color of a button Pin
David Crow5-Oct-09 4:09
David Crow5-Oct-09 4:09 
QuestionEnigma with ShellExecute ? [modified] Pin
Souldrift4-Oct-09 22:33
Souldrift4-Oct-09 22:33 
AnswerRe: Enigma with ShellExecute ? Pin
CPallini4-Oct-09 22:58
mveCPallini4-Oct-09 22:58 
There's something wrong in the posted snippet:

Souldrift wrote:
// version 1
char callString[1024];
sprintf_s( callString, "%s\\%s", buf, file.c_str() );

Here you're using a uninitialised buf variable (as far as I can tell from the posted code...).


Souldrift wrote:
har buf[1024];
sprintf_s( buf, "c:\\Users\\zwatschek\\work\\svn\\incubation\\ttsServer\\Data\\ttsWatchdog.exe" );

char id[32];
sprintf_s( id, "%d", pid );

long res=long(ShellExecute(0, "open", callString, id, 0, SW_SHOWNORMAL));

here you're copying (with a wrong call to sprintf_s - missing len parameter-) the file name to the buf variable, but, afterwards, you're not using buf in ShellExecute.

Please check through the posted code.
Smile | :)

If the Lord God Almighty had consulted me before embarking upon the Creation, I would have recommended something simpler.
-- Alfonso the Wise, 13th Century King of Castile.

This is going on my arrogant assumptions. You may have a superb reason why I'm completely wrong.
-- Iain Clarke

[My articles]

GeneralRe: Enigma with ShellExecute ? [modified] Pin
Souldrift4-Oct-09 23:10
Souldrift4-Oct-09 23:10 
GeneralRe: Enigma with ShellExecute ? Pin
CPallini4-Oct-09 23:37
mveCPallini4-Oct-09 23:37 
GeneralRe: Enigma with ShellExecute ? Pin
Souldrift4-Oct-09 23:42
Souldrift4-Oct-09 23:42 
GeneralRe: Enigma with ShellExecute ? Pin
Souldrift5-Oct-09 1:24
Souldrift5-Oct-09 1:24 
QuestionCan i change window title of SHBrowseForFolder Function. Pin
Le@rner4-Oct-09 21:11
Le@rner4-Oct-09 21:11 
AnswerRe: Can i change window title of SHBrowseForFolder Function. Pin
DeepakMega4-Oct-09 21:34
DeepakMega4-Oct-09 21:34 
GeneralRe: Can i change window title of SHBrowseForFolder Function. Pin
Le@rner4-Oct-09 21:39
Le@rner4-Oct-09 21:39 
GeneralRe: Can i change window title of SHBrowseForFolder Function. Pin
Le@rner4-Oct-09 21:42
Le@rner4-Oct-09 21:42 
GeneralRe: Can i change window title of SHBrowseForFolder Function. Pin
CPallini4-Oct-09 22:05
mveCPallini4-Oct-09 22:05 
AnswerRe: Can i change window title of SHBrowseForFolder Function. Pin
Iain Clarke, Warrior Programmer4-Oct-09 22:04
Iain Clarke, Warrior Programmer4-Oct-09 22:04 
GeneralRe: Can i change window title of SHBrowseForFolder Function. Pin
Le@rner4-Oct-09 22:15
Le@rner4-Oct-09 22:15 
GeneralRe: Can i change window title of SHBrowseForFolder Function. Pin
Le@rner4-Oct-09 22:21
Le@rner4-Oct-09 22:21 
GeneralRe: Can i change window title of SHBrowseForFolder Function. Pin
Stuart Dootson5-Oct-09 0:11
professionalStuart Dootson5-Oct-09 0:11 
QuestionWrong Output, Cant catch the mistake (DFS) Pin
zeego4-Oct-09 20:51
zeego4-Oct-09 20:51 
AnswerRe: Wrong Output, Cant catch the mistake (DFS) Pin
DeepakMega4-Oct-09 21:26
DeepakMega4-Oct-09 21:26 
GeneralRe: Wrong Output, Cant catch the mistake (DFS) Pin
zeego4-Oct-09 22:30
zeego4-Oct-09 22:30 
AnswerRe: Wrong Output, Cant catch the mistake (DFS) Pin
Saurabh.Garg4-Oct-09 22:53
Saurabh.Garg4-Oct-09 22:53 

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.