📄 sampleview.h
字号:
// SampleView.h : interface of the CSampleView class
//
/////////////////////////////////////////////////////////////////////////////
#if !defined(AFX_SAMPLEVIEW_H__718AF63C_3712_4742_AEA7_90D0CB99ABCF__INCLUDED_)
#define AFX_SAMPLEVIEW_H__718AF63C_3712_4742_AEA7_90D0CB99ABCF__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define WM_USER_THREAD_FINISHED WM_USER+0x100 //用户自定义消息
UINT ThreadFunc (LPVOID pParam); //线程控制函数
typedef struct tagTHREADPARMS //参数结构
{
CView* pt;
HWND hWnd;
} THREADPARMS;
class CSampleView : public CView
{
protected: // create from serialization only
CSampleView();
DECLARE_DYNCREATE(CSampleView)
// Attributes
public:
CSampleDoc* GetDocument();
// Operations
public:
BOOL IsRun;
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CSampleView)
public:
virtual void OnDraw(CDC* pDC); // overridden to draw this view
virtual BOOL PreCreateWindow(CREATESTRUCT& cs);
protected:
virtual BOOL OnPreparePrinting(CPrintInfo* pInfo);
virtual void OnBeginPrinting(CDC* pDC, CPrintInfo* pInfo);
virtual void OnEndPrinting(CDC* pDC, CPrintInfo* pInfo);
//}}AFX_VIRTUAL
// Implementation
public:
virtual ~CSampleView();
#ifdef _DEBUG
virtual void AssertValid() const;
virtual void Dump(CDumpContext& dc) const;
#endif
protected:
// Generated message map functions
protected:
//{{AFX_MSG(CSampleView)
afx_msg void OnRunThread();
afx_msg void OnUpdateRunThread(CCmdUI* pCmdUI);
afx_msg void OnRunStop();
afx_msg void OnDestroy();
//}}AFX_MSG
//手动添加自定义消息响应函数
afx_msg void OnThreadFinished (WPARAM wParam, LPARAM lParam);
DECLARE_MESSAGE_MAP()
};
#ifndef _DEBUG // debug version in SampleView.cpp
inline CSampleDoc* CSampleView::GetDocument()
{ return (CSampleDoc*)m_pDocument; }
#endif
/////////////////////////////////////////////////////////////////////////////
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_SAMPLEVIEW_H__718AF63C_3712_4742_AEA7_90D0CB99ABCF__INCLUDED_)
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -