CRect rect(10, 10, 30, 30); // bounding rectangle of checkbox CDC* pDC = GetDC(); // get device context DrawFrameControl(pDC->GetSafeHdc(), rect, DFC_BUTTON, DFCS_BUTTONCHECK); ReleaseDC(pDC); // release device context
CRect rect(10, 10, 30, 30); // bounding rectangle of radio button CDC* pDC = GetDC(); // get device context DrawFrameControl(pDC->GetSafeHdc(), rect, DFC_BUTTON, DFCS_BUTTONRADIO); ReleaseDC(pDC); // release device contextThis example shows how to draw a radio button control using CDC DrawFrameControl. The function is called with the device context and bounding rectangle of the control, as well as the control type (DFC_BUTTON) and the control state (DFCS_BUTTONRADIO) to draw an unselected radio button. Package library: Windows API