Thread: Stop Process?

  1. #1
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200

    Stop Process?

    I have made a simple little window. When I close the app, the process keeps running.

    I have this in my code

    Code:
    case WM_DESTROY:
            
        UnregisterClass("Class", g_hInstance);
        PostQuitMessage ( 0 );
            
    break;
    Why is the programs process still running after I close the app.
    What is C++?

  2. #2
    pronounced 'fib' FillYourBrain's Avatar
    Join Date
    Aug 2002
    Posts
    2,297
    does your GetMessage loop check for the 0 value?
    "You are stupid! You are stupid! Oh, and don't forget, you are STUPID!" - Dexter

  3. #3
    Registered User Codeplug's Avatar
    Join Date
    Mar 2003
    Posts
    4,981
    PostQuitMessage() simply puts WM_QUIT into the thread's message queue. Does your message loop handle WM_QUIT?

    gg

  4. #4
    i dont know Vicious's Avatar
    Join Date
    May 2002
    Posts
    1,200
    Ah, thank you,

    I forgot to check for WM_QUIT

    [edit]
    Funny thing is I just gave an example of that to someone else.
    What is C++?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. init adopts zombie process?
    By password636 in forum Linux Programming
    Replies: 4
    Last Post: 07-01-2009, 10:05 AM
  2. Killing A Process
    By tommyb05 in forum C Programming
    Replies: 8
    Last Post: 06-01-2009, 06:41 AM
  3. Understanding fork()
    By NuNn in forum C Programming
    Replies: 8
    Last Post: 02-27-2009, 12:09 PM
  4. Round Robin Scheduling using c.
    By eclipt in forum C Programming
    Replies: 8
    Last Post: 12-28-2005, 04:58 PM
  5. passing a connection to another process.
    By Kinasz in forum Networking/Device Communication
    Replies: 3
    Last Post: 10-09-2004, 05:34 PM