📄 win32window.h
字号:
#ifndef __WIN32WINDOW__
#define __WIN32WINDOW__
#ifndef __WINDOWS_H__
# include <windows.h>
# define __WINDOWS_H__
#endif
#ifndef __HEADER_H__
# include "../../Main/QHeader.h"
#endif
#ifndef __D3D8PREREQUISITES_H__
# include "DX8Prerequisites.h"
#endif
#ifndef __IWINDOWDEVICE_H__
# include "../../Main/IWindowDevice.h"
#endif
namespace QGE
{
namespace VISUAL
{
class _D3D8Export Win32Window : public IWindowDevice
{
public:
Win32Window(void);
virtual ~Win32Window(void);
void Create(const String& name,Bool bWindowed, Int32 Width,Int32 Height,Int32 Left,Int32 Top,void* MiscParam,...); //须传入HINSTANCE void Create(const String& name,HWND hWnd); //使用已有的窗口句柄,必须手工在OnPaint中调用Update Bool TurnToFullScreen(); void Destroy(void); void Resize(Int32 newWidth,Int32 newHeight); void MoveTo(Int32 newLeft, Int32 newTop); Bool isActive(void); Bool isClosed(void); Bool isFullScreen(void); void WindowMovedOrResized(void);
HWND getWindowHandle() { return mHWnd; }
HWND getParentWindowHandle() { return mParentHWnd; }
static LRESULT WndProc(
HWND hWnd,
UINT uMsg,
WPARAM wParam,
LPARAM lParam );
protected:
HINSTANCE mhInst;
HWND mHWnd; // Win32 Window handle
HWND mParentHWnd; // Parent Win32 window handle
Bool mbActive; // Is active i.e. visible
Bool mbReady; // Is ready i.e. available for update
Bool mbClosed;
Bool mbCanTurnToFullscreen;
};
}
}
#endif
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -