Provide a task-dialog based wxMSW wxMessageDialog implementation.

Use the task dialog instead of the legacy message box for wxMessageDialog
implementation under wxMSW on recent (Vista and later) Windows versions.

As part of this change, remove wxMessageDialogWithCustomLabels and integrate
its functionality in wxMessageDialogBase itself as it's now used by all
platforms.

git-svn-id: https://svn.wxwidgets.org/svn/wx/wxWidgets/trunk@65348 c3d73ce0-8a6f-49c7-b76d-6d57e0e08775
This commit is contained in:
Vadim Zeitlin
2010-08-18 22:48:28 +00:00
parent 5a607f8b23
commit ede7b01760
13 changed files with 364 additions and 118 deletions

View File

@@ -12,7 +12,7 @@
#ifndef _WX_MSGBOXDLG_H_
#define _WX_MSGBOXDLG_H_
class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogWithCustomLabels
class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase
{
public:
wxMessageDialog(wxWindow *parent,
@@ -20,7 +20,7 @@ public:
const wxString& caption = wxMessageBoxCaptionStr,
long style = wxOK|wxCENTRE,
const wxPoint& WXUNUSED(pos) = wxDefaultPosition)
: wxMessageDialogWithCustomLabels(parent, message, caption, style)
: wxMessageDialogBase(parent, message, caption, style)
{
m_hook = NULL;
}
@@ -55,11 +55,16 @@ private:
// offset all buttons starting from the first one given by dx to the right
void OffsetButtonsStartingFrom(int first, int dx);
// used by ShowModal() to display a message box when task dialogs
// aren't available.
int ShowMessageBox();
// used by ShowModal() to display a task dialog.
int ShowTaskDialog();
WXHANDLE m_hook; // HHOOK used to position the message box
DECLARE_DYNAMIC_CLASS(wxMessageDialog)
wxDECLARE_NO_COPY_CLASS(wxMessageDialog);
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxMessageDialog);
};