CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jul 2006
    Posts
    75

    [RESOLVED] WInAPI+MDI: Child MDI window with a tab incorrect display on maximize

    Hi ALL,

    My application GUI based on winapi and utilizes MDI.
    Everything was fine but when i added tab control to mdi child window i noticed a problem.
    When this window is maximized (within the frame window) there are no close buttons related to that window.
    As we know when child MDI window is maximized we have two rows of close/minimize buttons at the upper right corner.
    One is for the main frame and another for the child window.
    In my situation there is only one row for the main frame window.
    So when i maximize mdi window i can't minimize it back.

    That happened after i added tab control. WC_TABCONTROL class to be precise.

    Maybe anyone knows the solution? Currently i am out of ideas.

  2. #2
    Arjay's Avatar
    Arjay is offline Moderator / EX MS MVP Power Poster
    Join Date
    Aug 2004
    Posts
    13,490

    Re: WInAPI+MDI: Child MDI window with a tab incorrect display on maximize

    What parent window did you use for the tab control?

  3. #3
    Join Date
    Jul 2006
    Posts
    75

    Re: WInAPI+MDI: Child MDI window with a tab incorrect display on maximize

    Quote Originally Posted by Arjay View Post
    What parent window did you use for the tab control?
    Hello.
    The parent of the tab control is handle of the MDI window upon which it is created.
    I also noticed another ussue. All MDI windows has title. When we maximize MDI window the title of the main window is shown in the following format. Frame window title - MDI child window title.
    But with that MDI child which has tab control. The frame window title does not change when it is maximizes.
    Last edited by Sh@dow; February 17th, 2019 at 08:48 AM.

  4. #4
    Join Date
    Jul 2006
    Posts
    75

    Re: WInAPI+MDI: Child MDI window with a tab incorrect display on maximize

    After debugging i have solved the problem.
    WM_SIZE message handler for MDI child window was returning 0. Meaning that Default window procedure was not called.
    I seems that for correct window maximization Default window procedure must be called on WM_SIZE.
    Tab control was not the issue here.

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

Featured