BCGControlBar Pro for MFC
CBCGPStaticLayout

Detailed Description

The CBCGPStaticLayout class implements "static" layout management based on anchors. It is possible to specify anchors for each child control placed on host window ("host window" is a dialog box, property page or property sheet windows with enabled layout management).

For example, you have a dialog box with a list box (IDC_LIST), which can be resized horizontally and vertically and two buttons (IDOK and IDCANCEL), which can be moved in both directions.

In this case you can write the following code to enable the described layout management:

See also
CBCGPControlsLayout
Copy
CMyDialog::CMyDialog()
{
// Enable layout management for this dialog:
EnableLayout();
}
BOOL CMyDialog::OnInitDialog()
{
CBCGPDialog::OnInitDialog();
// Describe the desired layout:
CBCGPStaticLayout* pLayout = (CBCGPStaticLayout*)GetLayout();
if (pLayout != NULL)
{
}
}
+ Inheritance diagram for CBCGPStaticLayout:

Public Types

enum  XMoveType
 
enum  XSizeType
 

Public Member Functions

 AddAnchorAdds anchor for a control to layout manager.
 
 AddAnchorAdds anchor for a control to layout manager.
 
 AddGroupAnchorAdds anchor for controls located inside specific group to layout manager.
 
 AddGroupAnchorAdds anchor for controls located inside specific group to layout manager.
 
 AdjustLayoutAdjusts layout.
 
 DisableOnAddAnchorErrorSpecify whether layout should be disabled upon adding incorrect (non-existing) control.
 
 IsDisabledOnAddAnchorErrorTells whether layout should be disabled upon adding incorrect (non-existing) control.
 
- Public Member Functions inherited from CBCGPControlsLayout
 GetHostWndReturns a pointer to a host window.
 
 GetHostWndRectReturns size and position of layout rectangle.