⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 dpmonitordlg.h

📁 windows 2000/xpWDM设备驱动程序开发光盘代码
💻 H
字号:
// DPMonitorDlg.h : header file
//

#if !defined(AFX_DPMONITORDLG_H__BF9AE9C9_0489_42C9_BE5A_E9F1D3D42140__INCLUDED_)
#define AFX_DPMONITORDLG_H__BF9AE9C9_0489_42C9_BE5A_E9F1D3D42140__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

#define WM_PRINTEVENT	WM_USER+1
#define WM_PRINTERROR	WM_USER+2

class Print_Error
{	//用于子线程与主线程的通信,显示输出信息
public:
	CString Message;

	static HWND ViewHwnd;	// View Hwnd

	// Generate and send an event
	static void SendError( CString msg)
	{
		if( ViewHwnd==NULL) return;
		Print_Error* pError = new Print_Error;
		pError->Message = msg;
		::PostMessage( ViewHwnd, WM_PRINTERROR, 0, (LPARAM)pError);
	}
};
/////////////////////////////////////////////////////////////////////////////
// CDPMonitorDlg dialog

class CDPMonitorDlg : public CDialog
{
// Construction
public:
	CDPMonitorDlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	//{{AFX_DATA(CDPMonitorDlg)
	enum { IDD = IDD_DPMONITOR_DIALOG };
	CListCtrl	m_Event;
	//}}AFX_DATA

	// ClassWizard generated virtual function overrides
	//{{AFX_VIRTUAL(CDPMonitorDlg)
	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support
	//}}AFX_VIRTUAL

// Implementation
protected:
	HICON m_hIcon;
	CWinThread* m_pThread; //子线程

	// Generated message map functions
	//{{AFX_MSG(CDPMonitorDlg)
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	afx_msg void OnButton1();
	afx_msg void OnClose();
	//}}AFX_MSG
	afx_msg LONG OnPrintEvent(UINT, LONG);
	afx_msg void OnPrintError(UINT, LONG);
	DECLARE_MESSAGE_MAP()
};

//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.

#endif // !defined(AFX_DPMONITORDLG_H__BF9AE9C9_0489_42C9_BE5A_E9F1D3D42140__INCLUDED_)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -