📄 core_interface.cpp
字号:
/**************************************************
DirectDraw接口模块
Author: LittleFish QQ:93663886
E-Mail: kittyfish_1981@yahoo.com.cn
Blog: http://blog.csdn.net/kittyfish
真诚的期待你提出改良方法或程序BUG
**************************************************/
#include "Core_Interface.h"
BOOL CreateApplication( int x, int y, int width, int height, HINSTANCE hInst, TCHAR* chCaption )
{
cApplication* pApp = new cApplication();
pApp->SetHinstance( hInst );
pApp->SetPos( x, y );
pApp->SetSize( width, height );
pApp->SetCaption( chCaption );
g_pApplication = pApp;
if( g_pApplication == NULL )
return FALSE;
if( !pApp->Run() )
{
DebugMB( _T("Failed to CreateApplication !!!") );
}
return TRUE;
}
cDirectDraw* CreateDirectDraw( BOOL bFullScreen/* =FALSE */, int iWidth/* =800 */, int iHeight/* =600 */)
{
if( g_pDirectDraw != NULL )
return g_pDirectDraw;
if( g_pApplication == NULL )
{
DebugMB( _T("CreateApplication before CreateDirectDraw !!!") );
return NULL;
}
g_pDirectDraw = new cDirectDraw();
if( !g_pDirectDraw->Create( g_pApplication->GethWnd(), g_pApplication->GethInst(), bFullScreen, iWidth, iHeight ) )
{
DebugMB( _T("Failed to CreateDirectDraw !!!") );
return NULL;
}
return g_pDirectDraw;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -