X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/f5ea767eb8f7950caa42e06803ff38869b449c8b..1a42f89c41256c9de765b5e7671f4d1e94dbdc51:/src/os2/checklst.cpp?ds=sidebyside diff --git a/src/os2/checklst.cpp b/src/os2/checklst.cpp index 5f6282c54e..e1883b8545 100644 --- a/src/os2/checklst.cpp +++ b/src/os2/checklst.cpp @@ -27,6 +27,7 @@ #include "wx/ownerdrw.h" #include "wx/settings.h" #include "wx/dcmemory.h" +#include "wx/dcscreen.h" #include "wx/os2/checklst.h" #include "wx/log.h" @@ -225,9 +226,6 @@ void wxCheckListBoxItem::Check ( m_nIndex = (size_t)nIndex; } - HWND hWndListbox = (HWND)m_pParent->GetHWND(); - RECTL rUpdate; - MRESULT mRc; wxCommandEvent vEvent( wxEVT_COMMAND_CHECKLISTBOX_TOGGLED ,m_pParent->GetId() @@ -273,9 +271,7 @@ wxCheckListBox::wxCheckListBox ( , int nStrings , const wxString asChoices[] , long lStyle -#if wxUSE_VALIDATORS , const wxValidator& rVal -#endif , const wxString& rsName ) : wxListBox() @@ -287,9 +283,32 @@ wxCheckListBox::wxCheckListBox ( ,nStrings ,asChoices ,lStyle | wxLB_OWNERDRAW -#if wxUSE_VALIDATORS ,rVal -#endif + ,rsName + ); +} // end of wxCheckListBox::wxCheckListBox + +wxCheckListBox::wxCheckListBox ( + wxWindow* pParent +, wxWindowID vId +, const wxPoint& rPos +, const wxSize& rSize +, const wxArrayString& asChoices +, long lStyle +, const wxValidator& rVal +, const wxString& rsName +) + : wxListBox() +{ + wxCArrayString chs(asChoices); + Create( pParent + ,vId + ,rPos + ,rSize + ,chs.GetCount() + ,chs.GetStrings() + ,lStyle | wxLB_OWNERDRAW + ,rVal ,rsName ); } // end of wxCheckListBox::wxCheckListBox @@ -423,7 +442,7 @@ void wxCheckListBox::OnChar ( wxKeyEvent& rEvent ) { - if (rEvent.KeyCode() == WXK_SPACE) + if (rEvent.GetKeyCode() == WXK_SPACE) GetItem(GetSelection())->Toggle(); else rEvent.Skip(); @@ -446,7 +465,7 @@ void wxCheckListBox::OnLeftClick ( ,&nParentHeight ); vDc.SetFont(GetFont()); - vHeight = vDc.GetCharHeight() * 2.5; + vHeight = (wxCoord)(vDc.GetCharHeight() * 2.5); // // This, of course, will not work if the LB is scrolled