-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathRedrawHelper.h
34 lines (29 loc) · 878 Bytes
/
RedrawHelper.h
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
// RedrawHelper.h: interface for the CRedrawHelper class.
//
//////////////////////////////////////////////////////////////////////
#if !defined(AFX_RedrawHelper_H__3BADA50B_81BF_4C24_AA9A_35A06E1D93C6__INCLUDED_)
#define AFX_RedrawHelper_H__3BADA50B_81BF_4C24_AA9A_35A06E1D93C6__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
class CRedrawHelper
{
public:
CRedrawHelper(CWnd* pWnd)
:m_pWnd(pWnd)
{
ASSERT(NULL != m_pWnd);
m_pWnd->SetRedraw(FALSE);
}
~CRedrawHelper()
{
m_pWnd->SetRedraw();
}
CRedrawHelper(const CRedrawHelper& rhs) = delete;
CRedrawHelper& operator=(const CRedrawHelper& rhs) = delete;
CRedrawHelper(CRedrawHelper&& rhs) = delete;
CRedrawHelper& operator=(CRedrawHelper&& rhs) = delete;
private:
CWnd* m_pWnd{ nullptr };
};
#endif // !defined(AFX_RedrawHelper_H__3BADA50B_81BF_4C24_AA9A_35A06E1D93C6__INCLUDED_)