예제 #1
0
HWND Windowbar_Create(HWND hwndParent)
{
    NONCLIENTMETRICS nm;

    HWND hwndWindowBar = CreateWindowEx(
                            0x80,
                            WC_TABCONTROL, NULL,
                            WS_CHILDWINDOW | WS_VISIBLE |
                            WS_CLIPCHILDREN | WS_CLIPSIBLINGS |
                            WS_OVERLAPPED | TCS_FIXEDWIDTH |
                            TCS_BUTTONS | TCS_FLATBUTTONS |
                            TCS_HOTTRACK | TCS_FOCUSNEVER |
                            TCS_TOOLTIPS | TCS_FORCEICONLEFT,
                            CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT, CW_USEDEFAULT,
                            hwndParent, (HMENU)IDC_TAB_WINDOWBAR, g_hInstance, 0);

    nm.cbSize = sizeof(NONCLIENTMETRICS);
    SystemParametersInfo(SPI_GETNONCLIENTMETRICS, nm.cbSize, &nm, 0); 
    hFontWindowBar = CreateFontIndirect(&nm.lfMenuFont);

    Window_SetFont(hwndWindowBar, hFontWindowBar, TRUE);
    TabCtrl_SetMinTabWidth(hwndWindowBar, 80);

    return (hwndWindowBar);
}
예제 #2
0
void TabControl::SetMinTabWidth(int w)
{
	TabCtrl_SetMinTabWidth(hwnd, w);
}