CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums
Results 1 to 3 of 3

Thread: ClientRect of SDI

  1. #1
    Join Date
    Aug 2001

    ClientRect of SDI

    Hi all,

    I am working on a SDI application, there I am using a splitter to split the frame into two panes. Now, I want to adjust the pane size, for that I use GetClientRect within the Frame, the only problem is that that Rect returned also includes the size for the Toolbar above. Is there a way, that I can get Rect - the toolbar height??? I'd prefer not do something like RcFrame.Height()-RcToolBarHeight()


  2. #2
    Join Date
    Apr 1999

    Re: ClientRect of SDI

    that Rect returned also includes the size for the Toolbar above
    What toolbar are you refering to? Can you show a bitmap of the panes?
    Gort...Klaatu, Barada Nikto!

  3. #3
    Join Date
    May 1999

    Re: ClientRect of SDI

    It is unclear to me why are you using GetClientRect to obtain client area of the main frame?
    It will always return client rectangle without taking under consideration any windows that are inside of the client area.
    I am assuming that you are using static splitter.
    You should rather ask about splitter window size. Frame window positions splitter as the last, after laying out all other windows.
    You should call frame’s member RecalcLayout and than retrieve splitter’s rectangle.
    See this article for explanation how frame window positions and sizes all child windows.
    There are only 10 types of people in the world:
    Those who understand binary and those who do not.

Posting Permissions

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

Windows Mobile Development Center

Click Here to Expand Forum to Full Width

On-Demand Webinars (sponsored)