+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());
+ }
+
+ // we shouldn't destroy hDlg, so disassociate from it
+ SetHWND(NULL);
+}
+
+#endif // wxUSE_COLOURDLG && !(__SMARTPHONE__ && __WXWINCE__)