Exiting ?

This is a discussion on Exiting ? within the C++ Programming forums, part of the General Programming Boards category; I made a opengl program. My program exits but it still is running a process, how do you exit the ...

  1. #1
    Registered User
    Join Date
    May 2002
    Posts
    27

    Exiting ?

    I made a opengl program. My program exits but it still is running a process, how do you exit the program completely including its process ?

    heres my current code:
    Code:
    case WM_DESTROY:
    
         wglMakeCurrent(NULL, NULL);
         wglDeleteContext(hRC);
         ReleaseDC(hwnd, hDC);
         PostQuitMessage(0);

  2. #2
    Registered User
    Join Date
    Mar 2003
    Posts
    13
    someone help this dude.

    i have same problem too.
    Mouse

  3. #3
    Registered User
    Join Date
    Mar 2002
    Posts
    1,595
    the reason you have 45 views and 1 reply is that the code you have posted is a routine fragment of WINAPI and/or other Windows code. While some of the folks who frequent this site are comfortable with WINAPI/Windows coding, many (most?) do not (me included). If you wait a reasonable period of time and don't get a satisfactory response there is another board at this site which specializes in WINAPI/Windows. Posting there may provide a better opportunity for someone with the knowledge necessary to help you to respond.

  4. #4
    Master of the Universe! velius's Avatar
    Join Date
    Sep 2003
    Posts
    219
    With out more code I'd say that the problem is your message loop. Not your WM_DESTROY message handling. But it is very hard to say with only 4 lines of code in the WM_DESTROY message.
    While you're breakin' down my back n'
    I been rackin' out my brain
    It don't matter how we make it
    'Cause it always ends the same
    You can push it for more mileage
    But your flaps r' wearin' thin
    And I could sleep on it 'til mornin'
    But this nightmare never ends
    Don't forget to call my lawyers
    With ridiculous demands
    An you can take the pity so far
    But it's more than I can stand
    'Cause this couchtrip's gettin' older
    Tell me how long has it been
    'Cause 5 years is forever
    An you haven't grown up yet
    -- You Could Be Mine - Guns N' Roses

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. simple crash problem (exiting func)
    By te5la in forum C++ Programming
    Replies: 2
    Last Post: 09-16-2008, 04:15 PM
  2. Exiting the program.
    By Taka in forum C Programming
    Replies: 6
    Last Post: 10-14-2007, 10:24 AM
  3. Exiting windows through a C program.
    By Afro in forum C Programming
    Replies: 3
    Last Post: 06-23-2007, 09:29 AM
  4. Ask user to save file before exiting.
    By Bajanine in forum Windows Programming
    Replies: 3
    Last Post: 11-15-2004, 06:34 PM
  5. prevent exiting
    By Unregistered in forum A Brief History of Cprogramming.com
    Replies: 4
    Last Post: 12-12-2001, 02:57 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21