Thread: CWinApp

  1. #1
    Registered User headexplodes's Avatar
    Join Date
    Aug 2001
    Posts
    26

    Red face CWinApp

    I had the class wizard of MSVC++6 create an MFC application based on a dialog. I then removed the dialog because I didnt want it and i only wanted to run a simple painting process on a loop InitInstance. This worked fine.

    When i end my application (using the CTRL+ALT+DEL box) I says my application is not responding - which is what i expected because it's in an endless loop. I wanted to have a message when you end the application, so i created a thread for the painting. This worked fine too.

    The problem i have is the program exits if i let it finish the InitInstance function. How do i stop it from quitting? Do i have to have a window associated with the application for this to work?

    Any help or design sugestions would be great.

    Thanx, HeadExplodes.
    /* MSN and E-Mail - head_explodeshotmail.com */
    If Bill Gates got a dollar for every time windows crahsed... oh... he does.
    I always use MSVC++6.0

  2. #2
    Guest Sebastiani's Avatar
    Join Date
    Aug 2001
    Location
    Waterloo, Texas
    Posts
    5,708
    And why wouldn't you want it to finish?
    Code:
    #include <cmath>
    #include <complex>
    bool euler_flip(bool value)
    {
        return std::pow
        (
            std::complex<float>(std::exp(1.0)), 
            std::complex<float>(0, 1) 
            * std::complex<float>(std::atan(1.0)
            *(1 << (value + 2)))
        ).real() < 0;
    }

  3. #3
    Registered User headexplodes's Avatar
    Join Date
    Aug 2001
    Posts
    26

    Lightbulb

    Because i want the other thread to keep going.
    /* MSN and E-Mail - head_explodeshotmail.com */
    If Bill Gates got a dollar for every time windows crahsed... oh... he does.
    I always use MSVC++6.0

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Printing
    By gvector1 in forum Windows Programming
    Replies: 4
    Last Post: 03-21-2003, 09:10 AM
  2. Error c2352 in MSVC6
    By Unregistered in forum Windows Programming
    Replies: 22
    Last Post: 01-07-2002, 05:06 PM