// ID ID_32771 ID_32772
#define ID_32771 32771
#define ID_32772 32772
// CDllUseDemoView.h CDllUseDemoView
class CDllUseDemoView : public CScrollView
{
……
protected:
afx_msg void OnFilePrintPreview();
afx_msg void OnRButtonUp(UINT nFlags, CPoint point);
afx_msg void OnContextMenu(CWnd* pWnd, CPoint point);
DECLARE_MESSAGE_MAP()
public:
HANDLE m_pdispThread;//
HANDLE m_pCapThread;// DLL
afx_msg void OnLButtonDblClk(UINT nFlags, CPoint point);
afx_msg void Ondehaze();
afx_msg void Onhuifu();
};
// CDllUseDemoView.cpp
//
BEGIN_MESSAGE_MAP(CDllUseDemoView, CScrollView)
ON_WM_CONTEXTMENU()
ON_WM_RBUTTONUP()
ON_WM_LBUTTONDBLCLK()
ON_COMMAND(ID_32771, &CDllUseDemoView::Ondehaze)
ON_COMMAND(ID_32772, &CDllUseDemoView::Onhuifu)
END_MESSAGE_MAP()
// ID_32771
void CDllUseDemoView::Ondehaze()
{
dehazeflag=1;
}
// ID_32772
void CDllUseDemoView::Onhuifu()
{
dehazeflag=0;
}
//
void Thread_display(void* param)
{
while(1)
{
if (dehazeflag == 1)
{
// !!!
// !!!
}
}
}