- return SendMessage(GetHwnd(), LB_GETSEL, N, 0) == 0 ? FALSE : TRUE;
+ return SendMessage(GetHwnd(), LB_GETSEL, N, 0) == 0 ? false : true;
- ListBox_GetText(GetHwnd(), N, wxStringBuffer(result, len + 1));
+ ListBox_GetText(GetHwnd(), N, (wxChar*)wxStringBuffer(result, len + 1));
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") );
{
int existingExtent = (int)SendMessage(GetHwnd(), LB_GETHORIZONTALEXTENT, 0, 0L);
HDC dc = GetWindowDC(GetHwnd());
{
int existingExtent = (int)SendMessage(GetHwnd(), LB_GETHORIZONTALEXTENT, 0, 0L);
HDC dc = GetWindowDC(GetHwnd());
- 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,