1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
2005-03-11 10:34:42 -05:00
|
|
|
// Name: wx/msw/msgdlg.h
|
1998-05-20 10:12:05 -04:00
|
|
|
// Purpose: wxMessageDialog class
|
|
|
|
// Author: Julian Smart
|
|
|
|
// Modified by:
|
|
|
|
// Created: 01/02/97
|
|
|
|
// RCS-ID: $Id$
|
1998-08-07 19:52:45 -04:00
|
|
|
// Copyright: (c) Julian Smart
|
2004-08-30 06:18:55 -04:00
|
|
|
// Licence: wxWindows licence
|
1998-05-20 10:12:05 -04:00
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
|
|
|
1998-08-07 19:52:45 -04:00
|
|
|
#ifndef _WX_MSGBOXDLG_H_
|
|
|
|
#define _WX_MSGBOXDLG_H_
|
1998-05-20 10:12:05 -04:00
|
|
|
|
2010-08-18 18:48:28 -04:00
|
|
|
class WXDLLIMPEXP_CORE wxMessageDialog : public wxMessageDialogBase
|
1998-05-20 10:12:05 -04:00
|
|
|
{
|
|
|
|
public:
|
2007-05-24 08:50:42 -04:00
|
|
|
wxMessageDialog(wxWindow *parent,
|
|
|
|
const wxString& message,
|
|
|
|
const wxString& caption = wxMessageBoxCaptionStr,
|
|
|
|
long style = wxOK|wxCENTRE,
|
|
|
|
const wxPoint& WXUNUSED(pos) = wxDefaultPosition)
|
2010-08-18 18:48:28 -04:00
|
|
|
: wxMessageDialogBase(parent, message, caption, style)
|
2007-05-24 08:50:42 -04:00
|
|
|
{
|
2007-12-22 11:52:31 -05:00
|
|
|
m_hook = NULL;
|
2007-05-24 08:50:42 -04:00
|
|
|
}
|
|
|
|
|
|
|
|
virtual int ShowModal();
|
2003-01-02 18:38:11 -05:00
|
|
|
|
2008-09-11 06:39:49 -04:00
|
|
|
// implementation-specific
|
|
|
|
|
|
|
|
// return the font used for the text in the message box
|
|
|
|
static wxFont GetMessageFont();
|
|
|
|
|
2007-12-22 11:52:31 -05:00
|
|
|
private:
|
2008-09-05 10:39:36 -04:00
|
|
|
// hook procedure used to adjust the message box beyond what the standard
|
|
|
|
// MessageBox() function can do for us
|
2007-12-22 11:52:31 -05:00
|
|
|
static WXLRESULT wxCALLBACK HookFunction(int code, WXWPARAM, WXLPARAM);
|
|
|
|
|
2008-09-11 06:39:49 -04:00
|
|
|
static const struct ButtonAccessors
|
|
|
|
{
|
|
|
|
int id;
|
|
|
|
wxString (wxMessageDialog::*getter)() const;
|
|
|
|
} ms_buttons[];
|
|
|
|
|
|
|
|
// replace the static text control with a text control in order to show
|
|
|
|
// scrollbar (and also, incidentally, allow text selection)
|
|
|
|
void ReplaceStaticWithEdit();
|
|
|
|
|
2008-09-05 10:39:36 -04:00
|
|
|
// adjust the button labels
|
|
|
|
//
|
|
|
|
// this is called from HookFunction() and our HWND is valid at this moment
|
|
|
|
void AdjustButtonLabels();
|
|
|
|
|
2008-09-11 06:39:49 -04:00
|
|
|
// offset all buttons starting from the first one given by dx to the right
|
|
|
|
void OffsetButtonsStartingFrom(int first, int dx);
|
|
|
|
|
2010-08-18 18:48:28 -04:00
|
|
|
// used by ShowModal() to display a message box when task dialogs
|
|
|
|
// aren't available.
|
|
|
|
int ShowMessageBox();
|
|
|
|
|
2008-09-05 10:39:36 -04:00
|
|
|
|
2007-12-22 11:52:31 -05:00
|
|
|
WXHANDLE m_hook; // HHOOK used to position the message box
|
|
|
|
|
2010-08-18 18:48:28 -04:00
|
|
|
wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxMessageDialog);
|
1998-05-20 10:12:05 -04:00
|
|
|
};
|
|
|
|
|
|
|
|
|
2007-05-24 08:50:42 -04:00
|
|
|
#endif // _WX_MSGBOXDLG_H_
|