const wxString& rsStr
)
: wxOwnerDrawn( rsStr
- ,FALSE
+ ,false
)
{
//
wxSystemSettings vSettings;
- SetBackgroundColour(vSettings.GetSystemColour(wxSYS_COLOUR_WINDOW));
+ SetBackgroundColour(vSettings.GetColour(wxSYS_COLOUR_WINDOW));
SetForegroundColour(pParent->GetForegroundColour());
m_windowId = (vId == -1) ? (int)NewControlId() : vId;
);
if (m_hWnd == 0)
{
- return FALSE;
+ return false;
}
//
,nHeight
);
delete pTextFont;
- return TRUE;
+ return true;
} // end of wxListBox::Create
wxListBox::~wxListBox()
m_nNumItems = 0;
} // end of wxListBox::Clear
-void wxListBox::SetSelection(
+void wxListBox::DoSetSelection(
int N
, bool bSelect
)
int N
) const
{
- wxCHECK_MSG( N >= 0 && N < m_nNumItems, FALSE,
+ wxCHECK_MSG( N >= 0 && N < m_nNumItems, false,
wxT("invalid index in wxListBox::Selected") );
LONG lItem;
int nListbox = 0;
int nCx;
int nCy;
+ wxFont vFont = (wxFont)GetFont();
for (int i = 0; i < m_nNumItems; i++)
{
wxGetCharSize( GetHWND()
,&nCx
,&nCy
- ,(wxFont*)&GetFont()
+ ,&vFont
);
nListbox += 3 * nCx;
//
// Some event we're not interested in
//
- return FALSE;
+ return false;
}
wxCommandEvent vEvent( eEvtType
,m_windowId
{
n = -1;
}
- vEvent.m_commandInt = n;
+ vEvent.SetInt(n);
return GetEventHandler()->ProcessEvent(vEvent);
} // end of wxListBox::OS2Command
//
// Only owner-drawn control should receive this message
//
- wxCHECK(((m_windowStyle & wxLB_OWNERDRAW) == wxLB_OWNERDRAW), FALSE);
+ wxCHECK(((m_windowStyle & wxLB_OWNERDRAW) == wxLB_OWNERDRAW), false);
//
// The item may be -1 for an empty listbox
//
if (lItemID == -1L)
- return FALSE;
+ return false;
wxListBoxItem* pData = (wxListBoxItem*)PVOIDFROMMR( ::WinSendMsg( GetHwnd()
,LM_QUERYITEMHANDLE
)
);
- wxCHECK(pData, FALSE );
+ wxCHECK(pData, false );
wxDC vDc;
wxRect vRect( wxPoint( pDrawStruct->rclItem.xLeft
// For now we don't care about anything else
// just ignore the entire message!
//
- return TRUE;
+ return true;
}
}
return pData->OnDrawItem( vDc