fix for releasing the HDC in WM_DRAWITEM handler
git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@10261 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
@@ -773,14 +773,13 @@ bool wxListBox::MSWOnDraw(WXDRAWITEMSTRUCT *item)
|
||||
|
||||
wxListBoxItem *pItem = (wxListBoxItem *)data;
|
||||
|
||||
wxDC dc;
|
||||
dc.SetHDC((WXHDC)pStruct->hDC, FALSE);
|
||||
wxDCTemp dc((WXHDC)pStruct->hDC);
|
||||
wxRect rect(wxPoint(pStruct->rcItem.left, pStruct->rcItem.top),
|
||||
wxPoint(pStruct->rcItem.right, pStruct->rcItem.bottom));
|
||||
|
||||
return pItem->OnDrawItem(dc, rect,
|
||||
(wxOwnerDrawn::wxODAction)pStruct->itemAction,
|
||||
(wxOwnerDrawn::wxODStatus)pStruct->itemState);
|
||||
(wxOwnerDrawn::wxODAction)pStruct->itemAction,
|
||||
(wxOwnerDrawn::wxODStatus)pStruct->itemState);
|
||||
}
|
||||
|
||||
#endif
|
||||
|
Reference in New Issue
Block a user