Original Post
i've written a simple MFC GUI application that allows the user to change a bunch of settings, then click "launch." this will call the system() command to run an external executable with command line arguments. the GUI app remains open after the external program finishes so you can launch it again if you want. my problem is that upon logging into windows, the FIRST time i run the GUI and press launch, the external program just locks up. the external program is a simple directx program. when it's launched from the GUI for the first time, the whole screen turns black as if the resolution is about to be changed and the program executed. but instead, the hourglass cursor appears, and nothing happens. i have to manually exit the directx program, which brings up a program error message box asking if i want to send an error report. after the first time launching the program from the GUI, it works perfectly fine until i log off or restart. if i just run the directx program on it's own, it also works fine the first time. if i exit the GUI and run it again, everything still works fine. i'm calling _flushall() before i call system. i'm really confused by this problem. i'm not sure if it happens on all machines, but so far i believe it does. what can i be doing wrong??