#include <windowsx.h>
#include "wx/msw/private.h"
- #if defined(__WXWINCE__) && !wxUSE_SMARTPHONE
+ #ifndef __SMARTPHONE__
#include <commdlg.h>
#endif
wxColourData::wxColourData()
{
- int i;
- for (i = 0; i < 16; i++)
- m_custColours[i].Set(255, 255, 255);
-
- m_chooseFull = FALSE;
+ m_chooseFull = false;
m_dataColour.Set(0,0,0);
+ // m_custColours are wxNullColours initially
}
wxColourData::wxColourData(const wxColourData& data)
void wxColourData::SetCustomColour(int i, const wxColour& colour)
{
- if (i > 15 || i < 0)
- return;
+ wxCHECK_RET( (i >= 0 && i < 16), _T("custom colour index out of range") );
m_custColours[i] = colour;
}
wxColour wxColourData::GetCustomColour(int i)
{
- if (i > 15 || i < 0)
- return wxColour(0,0,0);
+ wxCHECK_MSG( (i >= 0 && i < 16), wxColour(0,0,0),
+ _T("custom colour index out of range") );
return m_custColours[i];
}
}
// Now convert the DEVMODE object, passed down from the PRINTDLG object,
- // into wxWindows form.
+ // into wxWidgets form.
m_printData.ConvertFromNative();
m_printFromPage = pd->nFromPage;