X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/2349ba4cf9adaded573727a5a6c806da2bcbf0b3..79cb759dc8580da2e82e880cd94a08cd38bb814e:/src/msw/colordlg.cpp diff --git a/src/msw/colordlg.cpp b/src/msw/colordlg.cpp index 60affe9fc6..f369f4762b 100644 --- a/src/msw/colordlg.cpp +++ b/src/msw/colordlg.cpp @@ -77,7 +77,7 @@ wxColourDialogHookProc(HWND hwnd, { CHOOSECOLOR *pCC = (CHOOSECOLOR *)lParam; wxColourDialog * const - dialog = wx_reinterpret_cast(wxColourDialog *, pCC->lCustData); + dialog = reinterpret_cast(pCC->lCustData); const wxString title = dialog->GetTitle(); if ( !title.empty() ) @@ -120,14 +120,14 @@ int wxColourDialog::ShowModal() CHOOSECOLOR chooseColorStruct; memset(&chooseColorStruct, 0, sizeof(CHOOSECOLOR)); - int i; + size_t i; // and transfer data from m_colourData to it COLORREF custColours[16]; for ( i = 0; i < WXSIZEOF(custColours); i++ ) { - if ( m_colourData.m_custColours[i].IsOk() ) - custColours[i] = wxColourToRGB(m_colourData.m_custColours[i]); + if ( m_colourData.GetCustomColour(i).IsOk() ) + custColours[i] = wxColourToRGB(m_colourData.GetCustomColour(i)); else custColours[i] = RGB(255,255,255); } @@ -135,7 +135,7 @@ int wxColourDialog::ShowModal() chooseColorStruct.lStructSize = sizeof(CHOOSECOLOR); if ( m_parent ) chooseColorStruct.hwndOwner = GetHwndOf(m_parent); - chooseColorStruct.rgbResult = wxColourToRGB(m_colourData.m_dataColour); + chooseColorStruct.rgbResult = wxColourToRGB(m_colourData.GetColour()); chooseColorStruct.lpCustColors = custColours; chooseColorStruct.Flags = CC_RGBINIT | CC_ENABLEHOOK; @@ -164,7 +164,7 @@ int wxColourDialog::ShowModal() wxRGBToColour(m_colourData.m_custColours[i], custColours[i]); } - wxRGBToColour(m_colourData.m_dataColour, chooseColorStruct.rgbResult); + wxRGBToColour(m_colourData.GetColour(), chooseColorStruct.rgbResult); // this doesn't seem to work (contrary to what MSDN implies) on current // Windows versions: CC_FULLOPEN is never set on return if it wasn't