Thread: GetSystemMetrics for tab controls?

  1. #1
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145

    GetSystemMetrics for tab controls?

    Is there a GetSystemMetrics value for tab controls. I'm specifically interested in the thickness of its frame. If possible the height of the tab-bars too, but that can be retrieved from TabCtrl_GetItemRect (though it requires an actual item).

    EDIT: Or at least the proper tab-control client rectangle (excluding the tabs and frame).
    Last edited by Magos; 03-13-2006 at 03:06 PM.
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

  2. #2
    Registered /usr
    Join Date
    Aug 2001
    Location
    Newport, South Wales, UK
    Posts
    1,273
    Quote Originally Posted by Magos
    EDIT: Or at least the proper tab-control client rectangle (excluding the tabs and frame).
    You're in luck, I think.

    A little program I started last week required the use of tabs and some controls "inside" their pages. Initially I placed an edit control within the confines of the page (excluding tabs and frame) using the following:-
    Code:
    RECT rc;
    
    rc.left = rc.top = 0;
    rc.right = LOWORD(lParam); // client width (This is from a WM_SIZE message)
    rc.bottom = HIWORD(lParam); // client height
    SendMessage(g_hwndTab, TCM_ADJUSTRECT, FALSE, (LPARAM)&rc); // tab control corrects
    I hope that's what you wanted.

  3. #3
    Confused Magos's Avatar
    Join Date
    Sep 2001
    Location
    Sweden
    Posts
    3,145
    Mighty fine message. Thanks!
    MagosX.com

    Give a man a fish and you feed him for a day.
    Teach a man to fish and you feed him for a lifetime.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Controls
    By osal in forum Windows Programming
    Replies: 7
    Last Post: 06-11-2004, 10:38 AM
  2. Subclassing controls
    By filler_bunny in forum Windows Programming
    Replies: 3
    Last Post: 04-28-2004, 05:43 PM
  3. I need help disabling Keyboard and Mouse input on Edit controls
    By Templario in forum Windows Programming
    Replies: 4
    Last Post: 01-07-2003, 12:59 AM
  4. MFC Controls and Thread Safety :: MFC
    By kuphryn in forum Windows Programming
    Replies: 0
    Last Post: 12-06-2002, 11:36 AM
  5. Diff between window controls and dialog controls
    By Garfield in forum Windows Programming
    Replies: 13
    Last Post: 01-18-2002, 05:49 AM