Share via


DrawFrameControl

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.

    Value Description
    DFC_BUTTON Standard button
    DFC_CAPTION Title bar
    DFC_SCROLL Scroll bar
  • uState
    Specifies the initial state of the frame control. If uType is DFC_BUTTON, uState can be one of the following values.

    Value Description
    DFCS_BUTTON3STATE Three-state button
    DFCS_BUTTONCHECK Check box
    DFCS_BUTTONPUSH Push button
    DFCS_BUTTONRADIO Radio button

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

    Value Description
    DFCS_CAPTIONCLOSE Close button
    DFCS_CAPTIONHELP Help button
    DFCS_CAPTIONOKBTN OK button

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

    Value Description
    DFCS_SCROLLCOMBOBOX Combo box scroll bar
    DFCS_SCROLLDOWN Down arrow of scroll bar
    DFCS_SCROLLLEFT Left arrow of scroll bar
    DFCS_SCROLLRIGHT Right arrow of scroll bar
    DFCS_SCROLLUP Up arrow of scroll bar

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

    Value Description
    DFCS_CHECKED The button is checked.
    DFCS_INACTIVE The button does not accept user input.
    DFCS_PUSHED The 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

Last updated on Wednesday, April 13, 2005

© 2005 Microsoft Corporation. All rights reserved.