// ----------------------------------------------------------------------------
// declaration and implementation of wxCheckListBoxItem class
// ----------------------------------------------------------------------------
// declaration and implementation of wxCheckListBoxItem class
HBITMAP hbmpOld = (HBITMAP)SelectObject(hdcMem, hbmpCheck);
// then draw a check mark into it
HBITMAP hbmpOld = (HBITMAP)SelectObject(hdcMem, hbmpCheck);
// then draw a check mark into it
- RECT rect = { 0, 0, nCheckWidth, nCheckHeight };
+#if defined(__WIN32__) && !defined(__SC__)
+ RECT rect;
+ rect.left = 0;
+ rect.top = 0;
+ rect.right = nCheckWidth;
+ rect.bottom = nCheckHeight;
DrawFrameControl(hdcMem, &rect, DFC_MENU, DFCS_MENUCHECK);
DrawFrameControl(hdcMem, &rect, DFC_MENU, DFCS_MENUCHECK);
#else
// In WIN16, draw a cross
HPEN blackPen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0));
#else
// In WIN16, draw a cross
HPEN blackPen = CreatePen(PS_SOLID, 1, RGB(0, 0, 0));
- HPEN whiteBrush = GetStockObject(WHITE_BRUSH);
- HPEN hPenOld = ::SelectObject(hdcMem, blackPen);
- HPEN hBrushOld = ::SelectObject(hdcMem, whiteBrush);
+ HPEN whiteBrush = (HPEN)GetStockObject(WHITE_BRUSH);
+ HPEN hPenOld = (HPEN)::SelectObject(hdcMem, blackPen);
+ HPEN hBrushOld = (HPEN)::SelectObject(hdcMem, whiteBrush);
::SetROP2(hdcMem, R2_COPYPEN);
Rectangle(hdcMem, 0, 0, nCheckWidth, nCheckHeight);
MoveTo(hdcMem, 0, 0);
::SetROP2(hdcMem, R2_COPYPEN);
Rectangle(hdcMem, 0, 0, nCheckWidth, nCheckHeight);
MoveTo(hdcMem, 0, 0);
if ( ::SendMessage(hwndListbox, LB_GETITEMRECT,
m_nIndex, (LPARAM)&rcUpdate) == LB_ERR )
{
if ( ::SendMessage(hwndListbox, LB_GETITEMRECT,
m_nIndex, (LPARAM)&rcUpdate) == LB_ERR )
{
}
#else // Win16
// FIXME this doesn't work if the listbox is scrolled!
size_t nHeight = m_pParent->GetItemHeight();
size_t y = m_nIndex * nHeight;
}
#else // Win16
// FIXME this doesn't work if the listbox is scrolled!
size_t nHeight = m_pParent->GetItemHeight();
size_t y = m_nIndex * nHeight;
- RECT rcUpdate = { 0, y, GetDefaultMarginWidth(), y + nHeight};
+ RECT rcUpdate ;
+ rcUpdate.left = 0 ;
+ rcUpdate.top = y ;
+ rcUpdate.right = GetDefaultMarginWidth() ;
+ rcUpdate.bottom = y + nHeight ;
void wxCheckListBox::Delete(int N)
{
wxCHECK_RET( N >= 0 && N < m_noItems,
void wxCheckListBox::Delete(int N)
{
wxCHECK_RET( N >= 0 && N < m_noItems,
}
void wxCheckListBox::InsertItems(int nItems, const wxString items[], int pos)
{
wxCHECK_RET( pos >= 0 && pos <= m_noItems,
}
void wxCheckListBox::InsertItems(int nItems, const wxString items[], int pos)
{
wxCHECK_RET( pos >= 0 && pos <= m_noItems,
for ( i = 0; i < nItems; i++ ) {
wxOwnerDrawn *pNewItem = CreateItem((size_t)(pos + i));
pNewItem->SetName(items[i]);
for ( i = 0; i < nItems; i++ ) {
wxOwnerDrawn *pNewItem = CreateItem((size_t)(pos + i));
pNewItem->SetName(items[i]);