- // then draw a check mark into it
-
- RECT rect;
- rect.left = 0;
- rect.top = 0;
- rect.right = nCheckWidth;
- rect.bottom = nCheckHeight;
-
-#ifdef __WXWINCE__
- DrawFrameControl(hdcMem, &rect, DFC_BUTTON, DFCS_BUTTONCHECK);
-#else
- DrawFrameControl(hdcMem, &rect, DFC_MENU, DFCS_MENUCHECK);
-#endif
-
- // finally copy it to screen DC and clean up
- BitBlt(hdc, x, y, nCheckWidth - 1, nCheckHeight,
- hdcMem, 0, 0, SRCCOPY);
-
- SelectObject(hdcMem, hbmpOld);
- DeleteObject(hbmpCheck);
- DeleteDC(hdcMem);
- }
-
- // now we draw the smaller rectangle
- y++;
- nCheckWidth -= 2;
- nCheckHeight -= 2;
-
- // draw hollow gray rectangle
- (void)SelectObject(hdc, hpenGray);
- HBRUSH hbrPrev = (HBRUSH)SelectObject(hdc, GetStockObject(NULL_BRUSH));
- Rectangle(hdc, x, y, x + nCheckWidth, y + nCheckHeight);
-
- // clean up
- (void)SelectObject(hdc, hpenPrev);
- (void)SelectObject(hdc, hbrPrev);
-
- DeleteObject(hpenBack);
- DeleteObject(hpenGray);
-
- /*
- dc.DrawRectangle(x, y, nCheckWidth, nCheckHeight);
-
- if ( IsChecked() ) {
- dc.DrawLine(x, y, x + nCheckWidth, y + nCheckHeight);
- dc.DrawLine(x, y + nCheckHeight, x + nCheckWidth, y);
- }
- */
-
- return TRUE;
- }
-
- return FALSE;
-}
-
-// change the state of the item and redraw it
-void wxCheckListBoxItem::Check(bool check)
-{
- m_bChecked = check;
-
- // index may be changed because new items were added/deleted
- if ( m_pParent->GetItemIndex(this) != (int)m_nIndex )