wSplitterPos | |||||||||||||
This macro returns the position of the splitter axis. Depending on the current division style (columns or rows), the position is the distance in pixels from the left or bottom boundary of the WC_SPLITPANE virtual rectangle or the percentage of the splitter range (i.e. the splitpane width or height depending on the current orientation). | |||||||||||||
Syntax: | |||||||||||||
INT wSplitterPos(HWND hwnd, BOOL bPercent); | |||||||||||||
Parameters: | |||||||||||||
HWND hwnd: | splitpane window handle. | ||||||||||||
BOOL bPercent: | TRUE to get the position as percentage of the splitpane width or height, FALSE to get the position in pixels as distance from the left or bottom border of the splitpane. | ||||||||||||
Return value: | |||||||||||||
INT: |
| ||||||||||||
Example: | |||||||||||||
INT pos; pos = wSplitterPos(hwndSplitPane, FALSE); ... |
dSplitterPos | |||||||||||||
This macro returns the position of the splitter axis. Depending on the current division style (columns or rows), the position is the distance in pixels from the left or bottom boundary of the WC_SPLITPANE virtual rectangle or the percentage of the splitter range (i.e. the splitpane width or height depending on the current orientation). | |||||||||||||
Syntax: | |||||||||||||
INT dSplitterPos(HWND hwndDlg, ULONG id, BOOL bPercent); | |||||||||||||
Parameters: | |||||||||||||
HWND hwndDlg: | dialog window handle. | ||||||||||||
ULONG id: | splitpane window ID. | ||||||||||||
BOOL bPercent: | TRUE to get the position as percentage of the splitpane width or height, FALSE to get the position in pixels as distance from the left or bottom border of the splitpane. | ||||||||||||
Return value: | |||||||||||||
INT: |
| ||||||||||||
Example: | |||||||||||||
INT pos; pos = dSplitterPos(hwndDlg, ID_SPLITPANE, FALSE); ... |
wSplitterSetPos | |
This macro sets the position of the splitter axis. Depending on the current division style (columns or rows), the position is the distance in pixels from the left or bottom boundary of the WC_SPLITPANE virtual rectangle. | |
Syntax: | |
BOOL wSplitterSetPos(HWND hwnd, BOOL bRelative, INT newPos); | |
Parameters: | |
HWND hwnd: | splitpane window handle. |
BOOL bRelative: | TRUE when the new position (in pixels) is relative to the current one. FALSE when the new position is absolute. |
INT newPos: | new splitter position. Positive values are interpreted as pixels. Negative values greater than -100, are interpreted as percentage (e.g. -25 sets the splitter position to one fourth of the splitpane width/height). When a SPLITHIDE_* flag is specified the value of the second short of message parameter 1 is ignored. Flag values are used to hide/restore panes (when the current splitpane style supports that):SPLITHIDE_1 hides the left/top pane, SPLITHIDE_2 hides the right/bottom/pane SPLITHIDE_RESTORE restores any hidden pane to its previous size. SPLITHIDE_LEFT and SPLITHIDE_TOP can be used to produce the same result of SPLITHIDE_1, while SPLITHIDE_RIGHT and SPLITHIDE_BOTTOM equate to SPLITHIDE_2. |
Return value: | |
BOOL: | TRUE if the position was succesfully changed FALSE if the position could not be changed. |
Example: | |
// set the left pane width to about 1/3 of the total splitpane width rc = wSplitterSetPos(hwndSplitPane1, FALSE, -33); // move the splitter of another splitpane 10 pixels down rc = wSplitterSetPos(hwndSplitPane2, TRUE, -10); ... |
dSplitterSetPos | |
This macro sets the position of the splitter axis. Depending on the current division style (columns or rows), the position is the distance in pixels from the left or bottom boundary of the WC_SPLITPANE virtual rectangle. | |
Syntax: | |
BOOL dSplitterSetPos(HWND hwndDlg, ULONG id, BOOL bRelative, INT newPos); | |
Parameters: | |
HWND hwndDlg: | dialog window handle. |
ULONG id: | splitpane window ID. |
BOOL bRelative: | TRUE when the new position (in pixels) is relative to the current one. FALSE when the new position is absolute. |
INT newPos: | new splitter position. Positive values are interpreted as pixels. Negative values greater than -100, are interpreted as percentage (e.g. -25 sets the splitter position to one fourth of the splitpane width/height). When a SPLITHIDE_* flag is specified the value of the second short of message parameter 1 is ignored. Flag values are used to hide/restore panes (when the current splitpane style supports that):SPLITHIDE_1 hides the left/top pane, SPLITHIDE_2 hides the right/bottom/pane SPLITHIDE_RESTORE restores any hidden pane to its previous size. SPLITHIDE_LEFT and SPLITHIDE_TOP can be used to produce the same result of SPLITHIDE_1, while SPLITHIDE_RIGHT and SPLITHIDE_BOTTOM equate to SPLITHIDE_2. |
Return value: | |
BOOL: | TRUE if the position was succesfully changed FALSE if the position could not be changed. |
Example: | |
// set the left pane width to about 1/3 of the total splitpane width rc = dSplitterSetPos(hwndDlg, ID_SPLITPANE1, FALSE, -33); // move the splitter of another splitpane 10 pixels down rc = dSplitterSetPos(hwndDlg, ID_SPLITPANE2, TRUE, -10); ... |