X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/6d5b2a57cf08040457f7a3e80a0d76e8c954bfe5..546bfbea8180aeee5a16f4abb34e721445277305:/src/msw/ownerdrw.cpp diff --git a/src/msw/ownerdrw.cpp b/src/msw/ownerdrw.cpp index 9e37e54ada..fe811c55d6 100644 --- a/src/msw/ownerdrw.cpp +++ b/src/msw/ownerdrw.cpp @@ -23,7 +23,7 @@ #ifndef WX_PRECOMP #include "wx/window.h" -// #include "wx/msw/private.h" + #include "wx/msw/private.h" #include "wx/font.h" #include "wx/bitmap.h" #include "wx/dcmemory.h" @@ -94,13 +94,13 @@ bool wxOwnerDrawn::OnMeasureItem(size_t *pwidth, size_t *pheight) { // Is BMP height larger then text height? size_t adjustedHeight = m_bmpChecked.GetHeight() + - wxSystemSettings::GetSystemMetric(wxSYS_EDGE_Y); + wxSystemSettings::GetMetric(wxSYS_EDGE_Y); if (*pheight < adjustedHeight) *pheight = adjustedHeight; // Does BMP encroach on default check menu position? size_t adjustedWidth = m_bmpChecked.GetWidth() + - (wxSystemSettings::GetSystemMetric(wxSYS_EDGE_X) * 2); + (wxSystemSettings::GetMetric(wxSYS_EDGE_X) * 2); if (ms_nDefaultMarginWidth < adjustedWidth) *pwidth += adjustedWidth - ms_nDefaultMarginWidth; @@ -137,7 +137,7 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, return TRUE; // wxColor <-> RGB - #define ToRGB(col) RGB(col.Red(), col.Green(), col.Blue()) + #define ToRGB(col) PALETTERGB(col.Red(), col.Green(), col.Blue()) #define UnRGB(col) GetRValue(col), GetGValue(col), GetBValue(col) // set the colors @@ -190,7 +190,8 @@ bool wxOwnerDrawn::OnDrawItem(wxDC& dc, } HFONT hPrevFont = (HFONT) ::SelectObject(hdc, hfont); - DrawState(hdc, NULL, NULL, + + DrawState(hdc, NULL, NULL, (LPARAM)m_strName.c_str(), m_strName.length(), x, rc.y, rc.GetWidth(), rc.GetHeight(), DST_PREFIXTEXT | (st & wxODDisabled ? DSS_DISABLED : 0));