forked from svn2github/FDM
-
Notifications
You must be signed in to change notification settings - Fork 4
/
ClientAreaWnd.cpp
96 lines (69 loc) · 1.71 KB
/
ClientAreaWnd.cpp
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
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
/*
Free Download Manager Copyright (c) 2003-2016 FreeDownloadManager.ORG
*/
#include "stdafx.h"
#include "FdmApp.h"
#include "ClientAreaWnd.h"
#include "DownloadsWnd.h"
extern CDownloadsWnd* _pwndDownloads;
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
CClientAreaWnd::CClientAreaWnd()
{
}
CClientAreaWnd::~CClientAreaWnd()
{
}
BEGIN_MESSAGE_MAP(CClientAreaWnd, CWnd)
//{{AFX_MSG_MAP(CClientAreaWnd)
ON_WM_CREATE()
ON_WM_SIZE()
ON_WM_SETFOCUS()
ON_WM_ERASEBKGND()
//}}AFX_MSG_MAP
END_MESSAGE_MAP()
int CClientAreaWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
m_bShowSWBar = _App.View_SWBar ();
if (CWnd::OnCreate(lpCreateStruct) == -1)
return -1;
if (FALSE == m_plugs2.Create (this))
return -1;
return 0;
}
void CClientAreaWnd::OnSize(UINT, int cx, int cy)
{
if (cx == 0 || cy == 0)
return;
m_plugs2.MoveWindow (0, 0, cx, cy);
}
BOOL CClientAreaWnd::Create(CWnd *pParent)
{
CRect rc (0, 0, 50, 50);
if (FALSE == CWnd::Create (AfxRegisterWndClass (0, NULL,
(HBRUSH)(COLOR_BTNFACE+1), NULL), NULL, WS_CHILD | WS_VISIBLE, rc, pParent, 0x111))
return FALSE;
return TRUE;
}
void CClientAreaWnd::SaveState()
{
}
void CClientAreaWnd::OnSetFocus(CWnd* pOldWnd)
{
CWnd::OnSetFocus(pOldWnd);
m_plugs2.SetFocus ();
}
BOOL CClientAreaWnd::OnEraseBkgnd(CDC* pDC)
{
if (_pwndDownloads->m_wndDownloads.m_info.m_video.m_wndVideo.m_player.Get_State () != VFPS_CLOSED)
{
CRect rc;
_pwndDownloads->m_wndDownloads.m_info.m_video.GetWindowRect(&rc);
ScreenToClient(&rc);
pDC->ExcludeClipRect(&rc);
}
return CWnd::OnEraseBkgnd(pDC);
}