git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@15273
c3d73ce0-8a6f-49c7-b76d-
6d57e0e08775
+ virtual void DoGetPosition( int *x, int *y ) const;
+
protected:
virtual void DoGetSize(int *width, int *height) const;
virtual void DoGetClientSize(int *width, int *height) const;
protected:
virtual void DoGetSize(int *width, int *height) const;
virtual void DoGetClientSize(int *width, int *height) const;
wxColourData m_colourData;
wxString m_title;
wxColourData m_colourData;
wxString m_title;
DECLARE_DYNAMIC_CLASS(wxColourDialog)
};
DECLARE_DYNAMIC_CLASS(wxColourDialog)
};
wxColourDialog *dialog = (wxColourDialog *)pCC->lCustData;
::SetWindowText(hwnd, dialog->GetTitle());
wxColourDialog *dialog = (wxColourDialog *)pCC->lCustData;
::SetWindowText(hwnd, dialog->GetTitle());
+
+ wxPoint pos = dialog->GetPosition();
+ if ( pos != wxDefaultPosition )
+ {
+ ::SetWindowPos(hwnd, NULL /* Z-order: ignored */,
+ pos.x, pos.y, -1, -1,
+ SWP_NOSIZE | SWP_NOZORDER);
+ }
wxColourDialog::wxColourDialog()
{
wxColourDialog::wxColourDialog()
{
+ m_pos = wxDefaultPosition;
}
wxColourDialog::wxColourDialog(wxWindow *parent, wxColourData *data)
{
}
wxColourDialog::wxColourDialog(wxWindow *parent, wxColourData *data)
{
+ m_pos = wxDefaultPosition;
+
// position/size
// ----------------------------------------------------------------------------
// position/size
// ----------------------------------------------------------------------------
-void wxColourDialog::DoSetSize(int WXUNUSED(x), int WXUNUSED(y),
+void wxColourDialog::DoGetPosition(int *x, int *y) const
+{
+ if ( x )
+ *x = m_pos.x;
+ if ( y )
+ *y = m_pos.y;
+}
+
+void wxColourDialog::DoSetSize(int x, int y,
int WXUNUSED(width), int WXUNUSED(height),
int WXUNUSED(sizeFlags))
{
int WXUNUSED(width), int WXUNUSED(height),
int WXUNUSED(sizeFlags))
{
- // ignore - we can't change the size of this standard dialog
+ if ( x != -1 )
+ m_pos.x = x;
+
+ if ( y != -1 )
+ m_pos.y = y;
+
+ // ignore the size params - we can't change the size of a standard dialog
if ( height )
*height = 299;
}
if ( height )
*height = 299;
}