- m_colourData.dataColour.Set(GetRValue(chooseColorStruct.rgbResult), GetGValue(chooseColorStruct.rgbResult),
- GetBValue(chooseColorStruct.rgbResult));
+ // if Centre() had been called before, it shouldn't be taken into
+ // account now
+ m_centreDir = 0;
+ }
+}
+
+void wxColourDialog::DoGetSize(int *width, int *height) const
+{
+ if ( width )
+ *width = gs_rectDialog.width;
+ if ( height )
+ *height = gs_rectDialog.height;
+}
+
+void wxColourDialog::DoGetClientSize(int *width, int *height) const
+{
+ if ( width )
+ *width = gs_rectDialog.width;
+ if ( height )
+ *height = gs_rectDialog.height;
+}
+
+void wxColourDialog::MSWOnInitDone(WXHWND hDlg)
+{
+ // set HWND so that our DoMoveWindow() works correctly
+ SetHWND(hDlg);
+
+ if ( m_centreDir )
+ {
+ // now we have the real dialog size, remember it
+ RECT rect;
+ ::GetWindowRect((HWND)hDlg, &rect);
+ gs_rectDialog = wxRectFromRECT(rect);
+
+ // and position the window correctly: notice that we must use the base
+ // class version as our own doesn't do anything except setting flags
+ wxDialog::DoCentre(m_centreDir);
+ }
+ else if ( m_movedWindow ) // need to just move it to the correct place
+ {
+ SetPosition(GetPosition());
+ }