Ronnie Ward wrote:
> I've built using VS 2008 C++ Release mode a Windows FLTK app (1.1.9) that 
> suppresses the DOS console using the Linker commands /SUBSYSTEM:WINDOWS and 
> /ENTRY:"mainCRTStartup".
> 
> The app executes fine, but when I "cancel" the app by clicking the X in the 
> upper right corner of its Fl_Window, the app terminates. However, when I open 
> TaskManager, it shows an entry for the app that is still executing (consuming 
> 50% of the cpu cycles).
> 
> I think it is related to running the app w/o a DOS WINDOW because when I 
> build a release version the shows the DOS box in the background 
> (/SUBSYSTEM:CONSOLE), I can terminate the FLTK Window app, but the DOS box 
> remains active. It also must be canceled (click X) to terminate it.
> 
> So, my question is how can I also terminate what I think is the invisible DOS 
> Window when I terminate an FLTK app built linked with the /SUBSYSTEM:WINDOWS 
> and /ENTRY:"mainCRTStartup" commands?


        How about the FLTK test applications; do they have the same problem?

        I've never seen this myself on windows, except when I had a problem
        with my app using CreateProcess() incorrectly.

        Does your app use threads?
        In task manager turn on threads to check the thread count
        while doing the tests.

        When your app is running, look at its PID at startup time, and see
        if there's more than one instance of the process or more than one
        thread.

        When you close the app, does that same PID remain running
        when you exit the program?

        If you redefine your window's callback() function to
        invoke a callback that just calls 'exit(0);', does that fix it?

        What does the end of your main() look like?
        Is the last thing return(Fl::run()); If so, try instead:

                Fl::run();
                exit(0);

_______________________________________________
fltk mailing list
[email protected]
http://lists.easysw.com/mailman/listinfo/fltk

Reply via email to