Reposition MDI Client window?


DevX Home    Today's Headlines   Articles Archive   Tip Bank   Forums   

Results 1 to 5 of 5

Thread: Reposition MDI Client window?

  1. #1
    Noel Gallagher Guest

    Reposition MDI Client window?

    I'd like to reposition the MDI Client window to a custom position. I'm parenting a
    window inside the mdi window, and I'd like to move the mdi client window out of the
    way to adjust for this windows size. I can subclass the MDI form and/or it's client
    window and move the client window by handling WM_SIZE, but there always seems to be a
    flicker when I move the client window. It appears to move to it's default position
    before moving to the position I want to move it to. Am I handling the wrong message?
    Should I handle WM_NCCALCSIZE and then position the client window? Any ideas? So, I
    guess my question is, how do I position the MDI Client window flawlessly?




  2. #2
    Mattias Sjögren Guest

    Re: Reposition MDI Client window?

    Noel,

    >Am I handling the wrong message?


    Yes, since WM_SIZE is sent after the window has been moved and sized
    to its new locaton. I suggest you try WM_SIZING or
    WM_WINDOWPOSCHANGING instead.


    Mattias

    __________________________________________________
    Mattias Sjögren (MCP) - mattiass @ hem.passagen.se
    VB+ http://hem.spray.se/mattias.sjogren/
    Please send questions/replies to the newsgroups

  3. #3
    Mattias Sjögren Guest

    Re: Reposition MDI Client window?

    Noel,

    >Am I handling the wrong message?


    Yes, since WM_SIZE is sent after the window has been moved and sized
    to its new locaton. I suggest you try WM_SIZING or
    WM_WINDOWPOSCHANGING instead.


    Mattias

    __________________________________________________
    Mattias Sjögren (MCP) - mattiass @ hem.passagen.se
    VB+ http://hem.spray.se/mattias.sjogren/
    Please send questions/replies to the newsgroups

  4. #4
    Phil Weber Guest

    Re: Reposition MDI Client window?

    > I'd like to reposition the MDI client window to a custom
    > position.


    Noel: I submit that if you feel the need to override MDI's default behavior,
    your app shouldn't be using MDI. The "MD" in MDI stand for "Multiple
    Document"; if your app doesn't deal with multiple documents, á la Word and
    Excel, it's not a good candidate for an MDI interface.

    Why don't you describe what your app does, and perhaps we can put our
    collective heads together and come up with some good ideas for your UI?
    ---
    Phil Weber


    [Followups to design.ui]



  5. #5
    Phil Weber Guest

    Re: Reposition MDI Client window?

    > I'd like to reposition the MDI client window to a custom
    > position.


    Noel: I submit that if you feel the need to override MDI's default behavior,
    your app shouldn't be using MDI. The "MD" in MDI stand for "Multiple
    Document"; if your app doesn't deal with multiple documents, á la Word and
    Excel, it's not a good candidate for an MDI interface.

    Why don't you describe what your app does, and perhaps we can put our
    collective heads together and come up with some good ideas for your UI?
    ---
    Phil Weber


    [Followups to design.ui]



Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  
HTML5 Development Center
 
 
FAQ
Latest Articles
Java
.NET
XML
Database
Enterprise
Questions? Contact us.
C++
Web Development
Wireless
Latest Tips
Open Source


   Development Centers

   -- Android Development Center
   -- Cloud Development Project Center
   -- HTML5 Development Center
   -- Windows Mobile Development Center