Change wxDIALOG_NO_PARENT value to avoid clashing with wxCENTRE.

Use a bit freed by removing wxTINY_CAPTION_HORIZ for wxDIALOG_NO_PARENT. This
allows to move it out from the lower byte of the style word to avoid conflicts
with the button selection flags which can be commonly combined with the dialog
styles.

More precisely, wxDIALOG_NO_PARENT used to clash with wxCENTRE, meaning that
wxSingleChoiceDialog, for example, was always created without parent because
its default style included wxCENTRE. This commit fixes this particular bug and
probably more similar ones.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@64280 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin 2010-05-10 21:10:03 +00:00
parent 7282b0678a
commit 654e324628
2 changed files with 4 additions and 3 deletions

View File

@ -25,7 +25,7 @@ class WXDLLIMPEXP_FWD_CORE wxScrolledWindow;
// Also see the bit summary table in wx/toplevel.h.
#define wxDIALOG_NO_PARENT 0x0001 // Don't make owned by apps top window
#define wxDIALOG_NO_PARENT 0x0100 // Don't make owned by apps top window
#ifdef __WXWINCE__
#define wxDEFAULT_DIALOG_STYLE (wxCAPTION | wxMAXIMIZE | wxCLOSE_BOX | wxNO_BORDER)

View File

@ -40,7 +40,7 @@ class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowBase;
|15|14|13|12|11|10| 9| 8| 7| 6| 5| 4| 3| 2| 1| 0|
+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+--+
| | | | | | | | | | | | | | | |
| | | | | | | | | | | | | | | \_ wxDIALOG_NO_PARENT
| | | | | | | | | | | | | | | \_ wxCENTRE
| | | | | | | | | | | | | | \____ wxFRAME_NO_TASKBAR
| | | | | | | | | | | | | \_______ wxFRAME_TOOL_WINDOW
| | | | | | | | | | | | \__________ wxFRAME_FLOAT_ON_PARENT
@ -48,7 +48,7 @@ class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowBase;
| | | | | | | | | | \________________
| | | | | | | | | \___________________ wxRESIZE_BORDER
| | | | | | | | \______________________ wxTINY_CAPTION_VERT
| | | | | | | \_________________________
| | | | | | | \_________________________ wxDIALOG_NO_PARENT
| | | | | | \____________________________ wxMAXIMIZE_BOX
| | | | | \_______________________________ wxMINIMIZE_BOX
| | | | \__________________________________ wxSYSTEM_MENU
@ -62,6 +62,7 @@ class WXDLLIMPEXP_FWD_CORE wxTopLevelWindowBase;
bits (wxYES, wxOK wxNO, wxCANCEL, wxAPPLY, wxCLOSE and wxNO_DEFAULT) which
can be combined with the dialog style for several standard dialogs and
hence shouldn't overlap with any styles which can be used for the dialogs.
Additionally, wxCENTRE can be used with frames also.
*/
// style common to both wxFrame and wxDialog