IMPLEMENT_DYNAMIC_CLASS_XTI(wxListBox, wxControl,"wx/listbox.h")
wxBEGIN_PROPERTIES_TABLE(wxListBox)
IMPLEMENT_DYNAMIC_CLASS_XTI(wxListBox, wxControl,"wx/listbox.h")
wxBEGIN_PROPERTIES_TABLE(wxListBox)
- wxEVENT_PROPERTY( Select , wxEVT_COMMAND_LISTBOX_SELECTED , wxCommandEvent )
- wxEVENT_PROPERTY( DoubleClick , wxEVT_COMMAND_LISTBOX_DOUBLECLICKED , wxCommandEvent )
+ wxEVENT_PROPERTY( Select , wxEVT_COMMAND_LISTBOX_SELECTED , wxCommandEvent )
+ wxEVENT_PROPERTY( DoubleClick , wxEVT_COMMAND_LISTBOX_DOUBLECLICKED , wxCommandEvent )
wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings, 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
wxPROPERTY( Font , wxFont , SetFont , GetFont , EMPTY_MACROVALUE, 0 /*flags*/ , wxT("Helpstring") , wxT("group"))
wxPROPERTY_COLLECTION( Choices , wxArrayString , wxString , AppendString , GetStrings, 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
- wxPROPERTY( Selection ,int, SetSelection, GetSelection, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
+ wxPROPERTY( Selection ,int, SetSelection, GetSelection, EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group") )
wxPROPERTY_FLAGS( WindowStyle , wxListBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
wxEND_PROPERTIES_TABLE()
wxPROPERTY_FLAGS( WindowStyle , wxListBoxStyle , long , SetWindowStyleFlag , GetWindowStyleFlag , EMPTY_MACROVALUE , 0 /*flags*/ , wxT("Helpstring") , wxT("group")) // style
wxEND_PROPERTIES_TABLE()
- return SendMessage(GetHwnd(), LB_GETSEL, N, 0) == 0 ? FALSE : TRUE;
+ return SendMessage(GetHwnd(), LB_GETSEL, N, 0) == 0 ? false : true;
wxCHECK_RET( pos >= 0 && pos <= m_noItems,
wxT("invalid index in wxListBox::InsertItems") );
wxCHECK_RET( pos >= 0 && pos <= m_noItems,
wxT("invalid index in wxListBox::InsertItems") );
- wxGetCharSize(GetHWND(), &cx, &cy, &GetFont());
+ wxGetCharSize(GetHWND(), &cx, &cy, GetFont());
bool wxListBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item)
{
// only owner-drawn control should receive this message
bool wxListBox::MSWOnMeasure(WXMEASUREITEMSTRUCT *item)
{
// only owner-drawn control should receive this message
pStruct->itemHeight = dc.GetCharHeight() + 2*OWNER_DRAWN_LISTBOX_EXTRA_SPACE;
pStruct->itemWidth = dc.GetCharWidth();
pStruct->itemHeight = dc.GetCharHeight() + 2*OWNER_DRAWN_LISTBOX_EXTRA_SPACE;
pStruct->itemWidth = dc.GetCharWidth();
}
// forward the message to the appropriate item
bool wxListBox::MSWOnDraw(WXDRAWITEMSTRUCT *item)
{
// only owner-drawn control should receive this message
}
// forward the message to the appropriate item
bool wxListBox::MSWOnDraw(WXDRAWITEMSTRUCT *item)
{
// only owner-drawn control should receive this message
DRAWITEMSTRUCT *pStruct = (DRAWITEMSTRUCT *)item;
UINT itemID = pStruct->itemID;
// the item may be -1 for an empty listbox
if ( itemID == (UINT)-1 )
DRAWITEMSTRUCT *pStruct = (DRAWITEMSTRUCT *)item;
UINT itemID = pStruct->itemID;
// the item may be -1 for an empty listbox
if ( itemID == (UINT)-1 )
- wxRect rect(wxPoint(pStruct->rcItem.left, pStruct->rcItem.top),
- wxPoint(pStruct->rcItem.right, pStruct->rcItem.bottom));
+ wxPoint pt1(pStruct->rcItem.left, pStruct->rcItem.top);
+ wxPoint pt2(pStruct->rcItem.right, pStruct->rcItem.bottom);
+ wxRect rect(pt1, pt2);
return pItem->OnDrawItem(dc, rect,
(wxOwnerDrawn::wxODAction)pStruct->itemAction,
return pItem->OnDrawItem(dc, rect,
(wxOwnerDrawn::wxODAction)pStruct->itemAction,