Results 1 to 2 of 2

Thread: Parent Destroy Child

  1. #1

    Thread Starter
    PowerPoster Halsafar's Avatar
    Join Date
    Jun 2004
    Location
    Saskatoon, SK
    Posts
    2,339

    Parent Destroy Child

    I want to call a child controls unload procedure whenever the Parent is destroying itself.


    This brings me to wonder.
    I do not handle WM_DESTROY for the parent.
    I just handle WM_CLOSE which calls Unload() which calls DestroyWindow(hwnd).

    When the unload() runs, it checks to see how many parents windows are still open before PostQuitMessage....

    When a parent is destroyed what does it send to the control?
    my controls are subclassed, so I have to capture anything???
    "From what was there, and was meant to be, but not of that was faded away." - - Steve Damm

    "The polar opposite of nothingness is existance. When existance calls apon nothingness it shall return to nothingness." - - Steve Damm

    "When you do things right, people won't be sure if you did anything at all." - - God from Futurama

  2. #2
    Frenzied Member
    Join Date
    Aug 2000
    Location
    Birmingham, AL
    Posts
    1,276
    I think you should only call PostQuitMessage on WM_DESTROY which will post after DestroyWindow(hWnd)

    Has nothing to do with your question but I think WM_CLOSE->PostQuitMessage(0) is incorrect.

    WM_CLOSE->DestroyWindow(hWnd)->WM_DESTROY->PostQuitMessage(0)

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width