1 /////////////////////////////////////////////////////////////////////////////
2 // Name: wx/msw/msgdlg.h
3 // Purpose: wxMessageDialog class
4 // Author: Julian Smart
8 // Copyright: (c) Julian Smart
9 // Licence: wxWindows licence
10 /////////////////////////////////////////////////////////////////////////////
12 #ifndef _WX_MSGBOXDLG_H_
13 #define _WX_MSGBOXDLG_H_
15 class WXDLLIMPEXP_CORE wxMessageDialog
: public wxMessageDialogBase
18 wxMessageDialog(wxWindow
*parent
,
19 const wxString
& message
,
20 const wxString
& caption
= wxMessageBoxCaptionStr
,
21 long style
= wxOK
|wxCENTRE
,
22 const wxPoint
& WXUNUSED(pos
) = wxDefaultPosition
)
23 : wxMessageDialogBase(parent
, message
, caption
, style
)
28 virtual int ShowModal();
30 // implementation-specific
32 // return the font used for the text in the message box
33 static wxFont
GetMessageFont();
36 // Override this as task dialogs are always centered on parent.
37 virtual void DoCentre(int dir
);
40 // hook procedure used to adjust the message box beyond what the standard
41 // MessageBox() function can do for us
42 static WXLRESULT wxCALLBACK
HookFunction(int code
, WXWPARAM
, WXLPARAM
);
44 static const struct ButtonAccessors
47 wxString (wxMessageDialog::*getter
)() const;
50 // replace the static text control with a text control in order to show
51 // scrollbar (and also, incidentally, allow text selection)
52 void ReplaceStaticWithEdit();
54 // adjust the button labels
56 // this is called from HookFunction() and our HWND is valid at this moment
57 void AdjustButtonLabels();
59 // offset all buttons starting from the first one given by dx to the right
60 void OffsetButtonsStartingFrom(int first
, int dx
);
62 // used by ShowModal() to display a message box when task dialogs
67 WXHANDLE m_hook
; // HHOOK used to position the message box
69 wxDECLARE_DYNAMIC_CLASS_NO_COPY(wxMessageDialog
);
73 #endif // _WX_MSGBOXDLG_H_