📄 childview.cpp
字号:
// ChildView.cpp : implementation of the CChildView class
//modify by pathfinder (冰雨) 2001年10月23日
//其中还有很多不完美,望与我联系.QQ:40871850;
#include "stdafx.h"
#include "happy.h"
#include "ChildView.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CChildView
CChildView::CChildView()
{
}
CChildView::~CChildView()
{
}
BEGIN_MESSAGE_MAP(CChildView,CWnd )
//{{AFX_MSG_MAP(CChildView)
ON_WM_PAINT()
//}}AFX_MSG_MAP
ON_WM_TIMER()
ON_WM_CREATE()
ON_WM_ERASEBKGND()
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CChildView message handlers
BOOL CChildView::PreCreateWindow(CREATESTRUCT& cs)
{
if (!CWnd::PreCreateWindow(cs))
return FALSE;
cs.dwExStyle |= WS_EX_CLIENTEDGE;
cs.style &= ~WS_BORDER;
cs.lpszClass = AfxRegisterWndClass(CS_HREDRAW|CS_VREDRAW|CS_DBLCLKS,
::LoadCursor(NULL, IDC_ARROW), HBRUSH(COLOR_WINDOWTEXT), NULL);
return TRUE;
}
void CChildView::OnPaint()
{
CPaintDC dc(this);
// device context for painting
// TODO: Add your message handler code here
// Do not call CWnd::OnPaint() for painting messages
}
void CChildView ::OnTimer (UINT nIDEvent)
{char *a=new char [512];
GetCurrentDirectory (100,a);
CString *s=new CString(a);
if (nIDEvent ==1)
{
myflash.LoadMovie (0,*s+CString("\\zf.swf"));
myflash.Play();
KillTimer (1);
}
if (nIDEvent==2)
{ myflash.StopPlay ();
myflash.LoadMovie(0,*s+CString("\\zg.swf"));
myflash.Play();
KillTimer (2);
}
CWnd ::OnTimer (nIDEvent );
}
int CChildView ::OnCreate (LPCREATESTRUCT lpCreateStruct)
{
if (CWnd::OnCreate(lpCreateStruct) == -1)
return -1;
//////////////////////////////////////////////////
myflash.Create (
NULL,WS_CHILD|WS_VISIBLE,CRect(0,0,0,0),
this ,1024);
SetTimer (1,0,NULL);
SetTimer (2,12000,NULL);
CRect m_rect;
GetClientRect (&m_rect );
myflash.MoveWindow (&m_rect);
//使flash窗口显示到视的满屏。
// TODO: Add your specialized creation code here
return 0;
}
BOOL CChildView::OnEraseBkgnd(CDC* pDC)
{
// TODO: Add your message handler code here and/or call default
return true;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -