Click here to Skip to main content
15,898,222 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: System Command: <b>[REPOST]</b> Pin
_AnsHUMAN_ 30-Jun-08 23:21
_AnsHUMAN_ 30-Jun-08 23:21 
AnswerRe: System Command: Pin
_AnsHUMAN_ 30-Jun-08 23:33
_AnsHUMAN_ 30-Jun-08 23:33 
GeneralRe: System Command: Pin
toxcct1-Jul-08 1:30
toxcct1-Jul-08 1:30 
GeneralRe: System Command: Pin
_AnsHUMAN_ 1-Jul-08 2:16
_AnsHUMAN_ 1-Jul-08 2:16 
GeneralRe: System Command: Pin
toxcct1-Jul-08 2:22
toxcct1-Jul-08 2:22 
GeneralRe: System Command: Pin
_AnsHUMAN_ 1-Jul-08 2:31
_AnsHUMAN_ 1-Jul-08 2:31 
GeneralRe: System Command: Pin
toxcct1-Jul-08 2:49
toxcct1-Jul-08 2:49 
AnswerRe: System Command: Pin
Bram van Kampen1-Jul-08 12:31
Bram van Kampen1-Jul-08 12:31 
Having read the replies, and having been there, the following suggestion:-
The Current working directory is easily changed, be it inadvertedly or otherwise. For instance, browsing with CFileDialog may change it. This can give rise to peculiar situations: Now it works, Now it doesn't. My approach is to use GetModuleFileName(). This gives the fully qualified file path to the file that is executing. Strip this back to the Directory of the current exe, and you have a starting point.Work out from here where 'CharacterAnimation.exe'is stored, and adjust the path accordingly.
So, the relative location between your exe and your target must be fixed!
If that is not the case, you should alow the user to browse for the file.
It is also good practice to default to a browse box (e.g. CFileDialog) if things go wrong, and the file cannot be found where expected.

And, ofcourse you should use ShellExecute() in stead of system.

Hope this is helpfull Smile | :)

Bram van Kampen

QuestionCDateTimeCtrl problem [modified] Pin
josip cagalj30-Jun-08 22:28
josip cagalj30-Jun-08 22:28 
AnswerRe: CDateTimeCtrl problem Pin
KarstenK30-Jun-08 23:24
mveKarstenK30-Jun-08 23:24 
AnswerRe: CDateTimeCtrl problem Pin
josip cagalj1-Jul-08 2:56
josip cagalj1-Jul-08 2:56 
GeneralRe: CDateTimeCtrl problem Pin
josip cagalj1-Jul-08 3:50
josip cagalj1-Jul-08 3:50 
Questionerror C2227 Pin
engilela30-Jun-08 19:34
engilela30-Jun-08 19:34 
AnswerRe: error C2227 Pin
KarstenK30-Jun-08 23:13
mveKarstenK30-Jun-08 23:13 
GeneralRe: error C2227 Pin
engilela1-Jul-08 20:52
engilela1-Jul-08 20:52 
AnswerRe: error C2227 Pin
Nelek3-Jul-08 21:48
protectorNelek3-Jul-08 21:48 
QuestionHelp with VC++... [modified] Pin
projectip30-Jun-08 18:46
projectip30-Jun-08 18:46 
AnswerRe: Help with VC++... Pin
projectip30-Jun-08 19:00
projectip30-Jun-08 19:00 
AnswerRe: Help with VC++... Pin
_AnsHUMAN_ 30-Jun-08 19:04
_AnsHUMAN_ 30-Jun-08 19:04 
GeneralRe: Help with VC++... Pin
projectip30-Jun-08 19:08
projectip30-Jun-08 19:08 
GeneralRe: Help with VC++... Pin
_AnsHUMAN_ 30-Jun-08 19:10
_AnsHUMAN_ 30-Jun-08 19:10 
GeneralRe: Help with VC++... Pin
projectip30-Jun-08 19:37
projectip30-Jun-08 19:37 
GeneralRe: Help with VC++... Pin
theCPkid30-Jun-08 19:11
theCPkid30-Jun-08 19:11 
GeneralRe: Help with VC++... Pin
projectip30-Jun-08 19:54
projectip30-Jun-08 19:54 
GeneralRe: Help with VC++... Pin
projectip30-Jun-08 19:55
projectip30-Jun-08 19:55 

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.