MDI Message handling
CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 2 of 2

Thread: MDI Message handling

  1. #1
    Join Date
    Sep 2011
    Posts
    2

    MDI Message handling

    Hi there,

    My problem is, that i dont know how to handle messages for my MDI childs.

    Sending a message to e.g. destroy a specific child window is no problem but is there the possibility to be notified, when a child window is closed?

    I wrote a window class by myself and pass it during the creation of the child in the LPARAM of the MDICREATESTRUCT.
    Practicaly i want to destroy this class when the user closes the window. So how can i handle the WM_CLOSE / WM_MDIDESTROY (??) Messages?

    Hope someone can help me out there i puzzled on this problem for a while now,
    Horrido Wh0p.

  2. #2
    Join Date
    Oct 2005
    Location
    Minnesota, U.S.A.
    Posts
    680

    Re: MDI Message handling

    On any window, you can handle things in the WM_DESTROY. That includes MDI child windows. Of course, you can use the WM_MDIDESTROY as well.

    If you want to close a class, do a "delete this" in the destroy, but that can be complicated. Or you can look at WM_PARENTNOTIFY.

    -Erik

Tags for this Thread

Posting Permissions

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


Azure Activities Information Page

Windows Mobile Development Center


Click Here to Expand Forum to Full Width

This is a CodeGuru survey question.


Featured


HTML5 Development Center