You cannot select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
97 lines
2.5 KiB
C++
97 lines
2.5 KiB
C++
#if !defined(AFX_LISTMSGBOX_H__DD10EECC_3A5A_44D8_AE91_7A11CACBFC3B__INCLUDED_)
|
|
#define AFX_LISTMSGBOX_H__DD10EECC_3A5A_44D8_AE91_7A11CACBFC3B__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
#ifdef BUILD_GUIDLL
|
|
#define DLLCLASS __declspec(dllexport)
|
|
#else
|
|
#define DLLCLASS __declspec(dllimport)
|
|
#endif
|
|
|
|
// ListMsgBox.h : header file
|
|
//
|
|
|
|
/////////////////////////////////////////////////////////////////////////////
|
|
// CListMsgBox dialog
|
|
|
|
class DLLCLASS CListMsgBox : public CDialog
|
|
{
|
|
// Construction
|
|
public:
|
|
CListMsgBox(LPCTSTR lpszText = NULL, UINT nType = MB_ICONEXCLAMATION, bool *bOkButtonClick = NULL, CWnd* pParent = NULL); // standard constructor
|
|
void InsertListBoxItem(CString *csItem, int iNoOfItem);
|
|
|
|
// Dialog Data
|
|
// {{AFX_DATA(CListMsgBox)
|
|
enum {
|
|
IDD = IDD_LIST_MSG_BOX
|
|
};
|
|
CShadeButtonST m_okBtn;
|
|
CShadeButtonST m_cancelBtn;
|
|
CStatic m_messageIcon;
|
|
// }}AFX_DATA
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
// {{AFX_VIRTUAL(CListMsgBox)
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
// }}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
protected:
|
|
|
|
// Generated message map functions
|
|
// {{AFX_MSG(CListMsgBox)
|
|
virtual BOOL OnInitDialog();
|
|
afx_msg void OnOKButtonClick();
|
|
afx_msg HBRUSH OnCtlColor(CDC* pDC, CWnd* pWnd, UINT nCtlColor);
|
|
afx_msg void OnClose();
|
|
// }}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
private:
|
|
void SetMessageIcon();
|
|
void SetMessageText();
|
|
void InitDlgIcons();
|
|
void SetDlgItemFont();
|
|
void CreateDlgFont(CString Name = "MS Sans Serif");
|
|
|
|
// Initialised List control
|
|
void InitListCtrl();
|
|
|
|
// set ok and cancel button placement
|
|
void SetButtonPlacement();
|
|
|
|
// word wrap message
|
|
void WordWrapMessage();
|
|
|
|
CListCtrl m_listCtrl;
|
|
CFont m_fontLogo;
|
|
HICON hiconExclamation;
|
|
HICON hiconInformation;
|
|
HICON hiconQuestion;
|
|
HICON hiconStop;
|
|
UINT m_nType;
|
|
LPCTSTR m_lpszText;
|
|
|
|
CString *m_csItem; // string pointer to list box items
|
|
|
|
int m_iNoOfItem; // number of item in the list box
|
|
|
|
bool *m_bOkButtonClick; // true = ok button press
|
|
|
|
enum
|
|
{
|
|
MAX_CHAR_DISPLAY = 70,
|
|
};
|
|
};
|
|
|
|
// {{AFX_INSERT_LOCATION}}
|
|
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
|
|
|
|
#endif // !defined(AFX_LISTMSGBOX_H__DD10EECC_3A5A_44D8_AE91_7A11CACBFC3B__INCLUDED_)
|