📄 animatesplash.cpp
字号:
// animatesplash.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "animatesplash.h"
#include "animatesplashDlg.h"
#include "LjxWnd.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/////////////////////////////////////////////////////////////////////////////
// CAnimatesplashApp
BEGIN_MESSAGE_MAP(CAnimatesplashApp, CWinApp)
//{{AFX_MSG_MAP(CAnimatesplashApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/////////////////////////////////////////////////////////////////////////////
// CAnimatesplashApp construction
CAnimatesplashApp::CAnimatesplashApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/////////////////////////////////////////////////////////////////////////////
// The one and only CAnimatesplashApp object
CAnimatesplashApp theApp;
/////////////////////////////////////////////////////////////////////////////
// CAnimatesplashApp initialization
BOOL CAnimatesplashApp::InitInstance()
{
AfxEnableControlContainer();
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
//增加的代码
CLjxWnd *ljxljx=new CLjxWnd; //建立一个新窗口对象
ljxljx->CreatLjxWnd (); //创建窗口
ljxljx->CenterWindow (); //在屏幕中央
ljxljx->ShowWindow (SW_SHOW); //显示窗口
ljxljx->UpdateWindow (); //更新窗口,激活OnPait函数
Sleep(2000); //等待函数指定秒钟
if (ljxljx!=NULL) ljxljx->SendMessage (WM_CLOSE); //关闭窗口
//增加的代码结束
CAnimatesplashDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application's message pump.
return FALSE;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -