SPBM_SETMASTER
Appearance
This message causes the component to identify its master.
Syntax
param1 HWND hwnd; /* Handle of master component. */ param2 ULONG ulReserved; /* Reserved value, should be 0. */
Parameters
- hwnd (HWND) - input
- Handle of master component.
- ulReserved (ULONG) - input
- Reserved value, should be 0.
Returns
- rc (BOOL) - return
- Success indicator.
- TRUE: Successful completion.
- FALSE: Error occurred.
Remarks
The application sends this message to the component to tell a component who its master is.
When the application wants to take control of the spin button, it must set the param1 of each spin button to NULLHANDLE. This must be done, for example, when a spin button with a non-contiguous list of spin values is created (2, 4, 6, 8, 10...). When the param1 of a spin button is NULLHANDLE, the spin button does not perform the following default functions:
- Spin up or down on its own when the Up or Down Arrow key is pressed.
- Spin up or down when the Up or Down Arrow of the master is pressed.
- A master does not take the focus when its arrows are pressed and none of its servants have focus.
- The spin button does not send itself an SPBM_QUERYVALUE message with the SPBQ_ALWAYSUPDATE flag to update the current value when an SPBM_SPINUP or [SPBM_SPINDOWN]] message is received.
- The spin button does not fast spin.
Default Processing
The default window procedure does not expect to receive this message and takes no action other than to return FALSE.