The SPLITPANECHILD structure

The SPLITPANECHILD structure is used by the WinCreateSplitPane() API to describe all the data needed for the creation of a child pane. There should be no need to declare it directly as it is used only as a member of the SPLITPCREATE structure (see the splitpane in standard windows example code for more details on typical usage).

Structure definition

#pragma pack(2) typedef struct { union { PSZ class; // class name PFNWP pDlgProc; // dialog procedure } ; union { PSZ text; // pane text (if any) HMODULE hmod; // module handle } ; union { PVOID pCtlData; // optional control data PSPLITPCREATE pSplitCreate; // nested splitpane creation data } ; PVOID pPresParams; // optional presentation parameters ULONG style; // pane style (WS_VISIBLE is set by default) USHORT id; // pane window ID USHORT type; // type of child (window, dialog, splitpane) } SPLITPANECHILD, * PSPLITPANECHILD;
PSZ class
class name of pane window. This can be one of the standard window classes (e.g. WC_LISTBOX, WC_SPINBUTTON, ecc.), a nested splitpane (WC_SPLITPANE) or any other user class (e.g. "myWinClass").
PFNWP pDlgProc
dialog procedure. This is used only when the child pane is a dialog. When not used, do not set to NULL to not overwrite the window class member.
PSZ text
optional pane window text.
HMODULE hmod
module handle. This is used only when the child pane is a dialog.
PVOID pCtlData
optional window control data (e.g. BTNCTDATA, SPBCDATA, etc.) or dialog creation parameters (last parameter of the WinLoadDlg() API)
PSPLITPCREATE pSplitCreate
address of a SPLITPCREATE structure used when the child pane is a nested splitpane.
PVOID pPresParams
optional presentation parameters of the child pane.
ULONG style
child pane style. It is not necessary to explicitally set WS_VISIBLE as the style is automatically added.
USHORT id
child pane window ID.
USHORT type
type of child pane. This can be:
SPLITCHILD_WND the child pane is an ordinary window. In this case the following members must be used: class, text, style, id.
pCtlData and pPresParams are optional.
SPLITCHILD_DLG the child pane is a dialog window. In this case the following members must be used: pDlgProc, hmod, id, type.
pCtlData is optional.
SPLITCHILD_SPLIT the child pane is a nested splitpane. The mandatory members in this case are: style, id, pSplitCreate and type.