Updating control data

The SPLITCTLDATA structure can be used to set at once multiple properties of a splitpane control on window creation (as a WinCreateWindow() parameter or as a CTLDATA resource script statement) or any time by sending the WM_SETWINDOWPARAMS message as described in the example below.
WNDPARAMS wp; SPLITCTLDATA scd; memset(&scd, 0, sizeof(scd)); scd.cb = sizeof(scd); memset(&wp, 0, sizeof(wp)); wp.fsStatus = WPM_CTLDATA; wp.cbCtlData = scd.cb; wp.pCtlData = &scd; // read the current settings scd.splitterPos = -20; // set the position to 20 % scd.minLeft = 100; // set min width to 100 pixels scd.minRight = 200; // set min width to 200 pixels scd.thickness = 10; // set the splitter thickness to 10 pixels scd.style = SPLITS_ROWS; // change to row division // set all the needed flags otherwise some members may be ignored: scd.flag = SPLITCD_POS | SPLITCD_MINLEFT | SPLITCD_MINRIGHT | SPLITCD_THICKNESS | SPLITCD_STYLE; WinSendMsg(g.hwndSplitPane, WM_SETWINDOWPARAMS, (MPARAM)&wp, MPVOID); ...