00001
00002
00003
00004
00005
00006 #include "stdafx.h"
00007 #include "FdmApp.h"
00008 #include "ClientAreaWnd.h"
00009 #include "DownloadsWnd.h"
00010
00011 extern CDownloadsWnd* _pwndDownloads;
00012
00013 #ifdef _DEBUG
00014 #define new DEBUG_NEW
00015 #undef THIS_FILE
00016 static char THIS_FILE[] = __FILE__;
00017 #endif
00018
00019 CClientAreaWnd::CClientAreaWnd()
00020 {
00021 }
00022
00023 CClientAreaWnd::~CClientAreaWnd()
00024 {
00025 }
00026
00027 BEGIN_MESSAGE_MAP(CClientAreaWnd, CWnd)
00028
00029 ON_WM_CREATE()
00030 ON_WM_SIZE()
00031 ON_WM_SETFOCUS()
00032 ON_WM_ERASEBKGND()
00033
00034 END_MESSAGE_MAP()
00035
00036 int CClientAreaWnd::OnCreate(LPCREATESTRUCT lpCreateStruct)
00037 {
00038 m_bShowSWBar = _App.View_SWBar ();
00039
00040 if (CWnd::OnCreate(lpCreateStruct) == -1)
00041 return -1;
00042
00043 if (FALSE == m_plugs2.Create (this))
00044 return -1;
00045
00046 return 0;
00047 }
00048
00049 void CClientAreaWnd::OnSize(UINT, int cx, int cy)
00050 {
00051 if (cx == 0 || cy == 0)
00052 return;
00053
00054 m_plugs2.MoveWindow (0, 0, cx, cy);
00055 }
00056
00057 BOOL CClientAreaWnd::Create(CWnd *pParent)
00058 {
00059 CRect rc (0, 0, 50, 50);
00060
00061 if (FALSE == CWnd::Create (AfxRegisterWndClass (0, NULL,
00062 (HBRUSH)(COLOR_BTNFACE+1), NULL), NULL, WS_CHILD | WS_VISIBLE, rc, pParent, 0x111))
00063 return FALSE;
00064
00065 return TRUE;
00066 }
00067
00068 void CClientAreaWnd::SaveState()
00069 {
00070 }
00071
00072 void CClientAreaWnd::OnSetFocus(CWnd* pOldWnd)
00073 {
00074 CWnd::OnSetFocus(pOldWnd);
00075 m_plugs2.SetFocus ();
00076 }
00077
00078 BOOL CClientAreaWnd::OnEraseBkgnd(CDC* pDC)
00079 {
00080 if (_pwndDownloads->m_wndDownloads.m_info.m_video.m_wndVideo.m_player.Get_State () != VFPS_CLOSED)
00081 {
00082 CRect rc;
00083
00084 _pwndDownloads->m_wndDownloads.m_info.m_video.GetWindowRect(&rc);
00085 ScreenToClient(&rc);
00086
00087
00088 pDC->ExcludeClipRect(&rc);
00089 }
00090
00091 return CWnd::OnEraseBkgnd(pDC);
00092 }