Hide

SftTabs/DLL 6.5 - Tab Control

Display
Print

AdjustClientRect

Calculates a tab control size which will provide a client area of the given size.

C

BOOL SftTabs_AdjustClientRect(HWND hwndCtl, LPRECT lpRect);

C++

BOOL CSftTabs::AdjustClientRect(LPRECT lpRect) const;

Parameters

hwndCtl

The window handle of the tab control.

lpRect

A pointer to a RECT structure containing the desired client area size. The values in the RECT structure will be updated to contain the required tab control size to accommodate the desired client area size.

Returns

The return value is TRUE if the function was successful, otherwise FALSE is returned.

Comments

The AdjustClientRect function calculates a tab control size which will provide a client area of the given size.

This function can only be used with tab control styles that provide a client area (fClientArea of the SFTTABS_CONTROL structure is TRUE).

Example

This example calculates the tab control size necessary to fit a client area size of 100 pixels in width and 50 pixels in height:

C

RECT rect; 
SetRect(&rect, 0, 0, 100, 50); 
SftTabs_AdjustClientRect(hwndTab, &rect);

C++

CRect rect(0,0,100,50); 
m_Tab.AdjustClientRect(&rect);

See Also C/C++ API | C++ Classes | Notifications


Last Updated 08/13/2020 - (email)
© 2024 Softel vdm, Inc.