DrawFrameControl (Windows CE 5.0)

Windows CE 5.0
Send Feedback

This function draws a frame control of the specified type and style.

BOOL DrawFrameControl( 
  HDC hdc, 
  LPRECT lprc, 
  UINT uType, 
  UINT uState
); 

Parameters

hdc
Handle to the device context of the window in which to draw the control.
lprc
Long pointer to a RECT structure that contains the logical coordinates of the bounding rectangle for frame control.
uType
Specifies the type of frame control to draw.

This parameter can be one of the following values.

ValueDescription
DFC_BUTTONStandard button
DFC_CAPTIONTitle bar
DFC_SCROLLScroll bar
uState
Specifies the initial state of the frame control.

If uType is DFC_BUTTON, uState can be one of the following values.

ValueDescription
DFCS_BUTTON3STATEThree-state button
DFCS_BUTTONCHECKCheck box
DFCS_BUTTONPUSHPush button
DFCS_BUTTONRADIORadio button

If uType is DFC_CAPTION, uState can be one of the following values.

ValueDescription
DFCS_CAPTIONCLOSEClose button
DFCS_CAPTIONHELPHelp button
DFCS_CAPTIONOKBTNOK button

If uType is DFC_SCROLL, uState can be one of the following values.

ValueDescription
DFCS_SCROLLCOMBOBOXCombo box scroll bar
DFCS_SCROLLDOWNDown arrow of scroll bar
DFCS_SCROLLLEFTLeft arrow of scroll bar
DFCS_SCROLLRIGHTRight arrow of scroll bar
DFCS_SCROLLUPUp arrow of scroll bar

One or more of the following values can be used to set the state of the control to be drawn.

ValueDescription
DFCS_CHECKEDThe button is checked.
DFCS_INACTIVEThe button does not accept user input.
DFCS_PUSHEDThe button is pushed.

Return Values

Nonzero indicates success.

Zero indicates failure.

To get extended error information, call GetLastError.

Remarks

If uType is DFC_BUTTON and uState is not DFCS_BUTTONPUSH, the frame control is a black-on-white mask (that is, a black frame control on a white background).

In such cases, the application must pass a handle to a bitmap memory device control. The application can then use the associated bitmap as the hbmMask parameter to the MaskBlt function, or it can use the device context as a parameter to the BitBlt function using ROPs such as SRCAND and SRCINVERT.

Requirements

OS Versions: Windows CE 2.0 and later.
Header: Winuser.h.
Link Library: Nclient.lib.

See Also

BitBlt | MaskBlt | RECT


Send Feedback on this topic to the authors

Feedback FAQs

© 2006 Microsoft Corporation. All rights reserved.


Show: