CM PAINTBACKGROUND: Difference between revisions
Created page with "This message informs an application whenever a container's background is painted if the CA_OWNERPAINTBACKGROUND attribute of the CNRINFO data structure is specified. ==Syntax== <PRE> param1 POWNERBACKGROUND pOwnerBackground; →Pointer to the OWNERBACKGROUND structure.: param2 ULONG ulReserved; →Reserved value, should be 0.: </PRE> ==Parameters== ;pOwnerBackground (POWNERBACKGROUND) - Input : Pointer to the OWNERBACKGROUND structure. ;u..." |
|||
(One intermediate revision by the same user not shown) | |||
Line 22: | Line 22: | ||
==Remarks== | ==Remarks== | ||
The CM_PAINTBACKGROUND message is provided so that an application can subclass the container control and paint its own background. If the application does not subclass the container control or subclasses the container control and returns FALSE, the container uses the system window color, which is specified by SYSCLR_WINDOW. This color can be changed by using the PP_BACKGROUNDCOLOR or PP_BACKGROUNDCOLORINDEX presentation parameter of the [[WM_PRESPARAMCHANGED (in Container Controls) | The [[CM_PAINTBACKGROUND]] message is provided so that an application can subclass the container control and paint its own background. If the application does not subclass the container control or subclasses the container control and returns FALSE, the container uses the system window color, which is specified by SYSCLR_WINDOW. This color can be changed by using the PP_BACKGROUNDCOLOR or PP_BACKGROUNDCOLORINDEX presentation parameter of the [[WM_PRESPARAMCHANGED]] (in Container Controls) message. | ||
==Default Processing== | ==Default Processing== |
Latest revision as of 01:03, 21 April 2025
This message informs an application whenever a container's background is painted if the CA_OWNERPAINTBACKGROUND attribute of the CNRINFO data structure is specified.
Syntax
param1 POWNERBACKGROUND pOwnerBackground; /* Pointer to the OWNERBACKGROUND structure. */ param2 ULONG ulReserved; /* Reserved value, should be 0. */
Parameters
- pOwnerBackground (POWNERBACKGROUND) - Input
- Pointer to the OWNERBACKGROUND structure.
- ulReserved (ULONG) - Input
- Reserved value, should be 0.
Returns
- rc (BOOL) - returns
- Process indicator.
- TRUE: The application processed the CM_PAINTBACKGROUND message.
- FALSE: The application did not process the CM_PAINTBACKGROUND message.
Remarks
The CM_PAINTBACKGROUND message is provided so that an application can subclass the container control and paint its own background. If the application does not subclass the container control or subclasses the container control and returns FALSE, the container uses the system window color, which is specified by SYSCLR_WINDOW. This color can be changed by using the PP_BACKGROUNDCOLOR or PP_BACKGROUNDCOLORINDEX presentation parameter of the WM_PRESPARAMCHANGED (in Container Controls) message.
Default Processing
The default window procedure does not expect to receive this message and therefore takes no action on it other than to return FALSE.