#pragma once #include #include "DllDefines.h" #include "ShadeButtonST.h" #include "utilityresource.h" // MessageBox.h : header file // ///////////////////////////////////////////////////////////////////////////// // CMessageBox dialog class UTILITYDLL CMessageBox : public CDialog { // Construction public: CMessageBox(bool bDisplayStatus, LPCTSTR lpszCaption, LPCTSTR lpszText, UINT nType = MB_ICONEXCLAMATION, bool EnableCounter = false, int* Count = NULL, bool* SingleRow = NULL, CWnd* pParent = NULL); CMessageBox(LPCTSTR lpszText, UINT nType = MB_ICONEXCLAMATION, bool bDisplayStatus = false, bool EnableCounter = false, int* Count = NULL, bool* SingleRow = NULL, CWnd* pParent = NULL); // standard constructor CMessageBox(LPCTSTR lpszText, LPCTSTR lpszDetails, UINT nType = MB_ICONEXCLAMATION, CWnd* pParent = NULL); virtual INT_PTR DoModal(); static CString GetLastMessage(); static void ResetLastMessage(); int* m_bcount; bool* m_bSingleRow; // Dialog Data // {{AFX_DATA(CMessageBox) enum { IDD = IDD_MESSAGE_BOX_DLG }; CEdit m_editCtrl; CProgressCtrl m_progressBar; CShadeButtonST m_cbOk; CShadeButtonST m_cbCancel; CStatic m_messageIcon; // }}AFX_DATA /* static void CALLBACK EXPORT TimerProc( HWND hWnd, // handle of CWnd that called SetTimer UINT nMsg, // WM_TIMER UINT nIDEvent, // timer identification DWORD dwTime // system time ); */ void SetOkButtonLabel(const char* sOkButtonLabel); void SetCancelButtonLabel(const char* sCancelButtonLabel); // Overrides // ClassWizard generated virtual function overrides // {{AFX_VIRTUAL(CMessageBox) public: protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support // }}AFX_VIRTUAL // Implementation protected: // Generated message map functions // {{AFX_MSG(CMessageBox) virtual BOOL OnInitDialog(); afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor); virtual void OnOK(); virtual void OnCancel(); #if _MSC_VER > 1200 afx_msg LRESULT OnCloseDisplay(WPARAM wp, LPARAM lp); #else afx_msg void OnCloseDisplay(); #endif afx_msg void OnTimer(UINT_PTR nIDEvent); afx_msg void OnDetails(); afx_msg void OnClose(); // }}AFX_MSG DECLARE_MESSAGE_MAP() private: static CString m_csLastMessage; enum { MAX_STR_LEN = 50, }; void SetProgressBar(); void SetMessageIcon(); void SetMessageText(); void InitDlgIcons(); void SetDlgItemFont(); void CreateDlgFont(CString Name = _T("MS Sans Serif")); // set ok and cancel button placement void SetButtonPlacement(); // word wrap message // void WordWrapMessage(); bool m_bEnableCounter; CFont m_fontLogo; UINT m_nType; #if _MSC_VER > 1200 char* m_lpszText; #else LPCTSTR m_lpszText; #endif LPCTSTR m_lpszCaption; CString m_csText; CString m_csCaption; HICON hiconExclamation; HICON hiconInformation; HICON hiconQuestion; HICON hiconStop; char strButton1[MAX_STR_LEN]; char strButton2[MAX_STR_LEN]; bool m_bDisplayStatus; bool m_bModeless; CBrush m_brushBackground; bool m_bExpand; CString m_csItem; static COLORREF m_colorBackground; static bool m_bCustomizedColor; static bool m_bCustomizedOptionLoaded; };