Danbias/Code/WindowManager/WindowShell.h

65 lines
1.9 KiB
C
Raw Normal View History

2013-12-18 12:18:01 +01:00
//////////////////////////////////////////////////////////
2013-12-12 09:33:59 +01:00
// Created 2013 //
// Dennis Andersen, Linda Andersson //
//////////////////////////////////////////////////////////
#ifndef WINDOWMANAGER_WINDOWSHELL_H
#define WINDOWMANAGER_WINDOWSHELL_H
#include <Windows.h>
class WindowShell
{
2013-12-12 09:33:59 +01:00
public:
struct WINDOW_INIT_DESC
{
HWND parent; //!< Optional
HINSTANCE hInstance; //!< Optional
WNDPROC windowProcCallback; //!< Optional
2013-12-12 09:33:59 +01:00
const wchar_t* windowName; //!< Optional
POINT windowSize; //!< Optional
POINT windowPosition; //!< Optional
2013-12-12 09:33:59 +01:00
UINT windowClassStyle; //!< Optional
UINT windowStyle; //!< Optional
2013-12-12 09:33:59 +01:00
HICON icon; //!< Optional
HCURSOR cursor; //!< Optional
HBRUSH background; //!< Optional
2013-12-12 09:33:59 +01:00
WINDOW_INIT_DESC()
{
parent = 0;
hInstance = NULL;
2013-12-18 12:18:01 +01:00
windowName = L"おはよう";
2013-12-12 09:33:59 +01:00
windowSize.x = 800;
windowSize.y = 600;
windowPosition.x = 0;
windowPosition.y = 0;
windowProcCallback = NULL;
windowClassStyle = CS_HREDRAW | CS_VREDRAW | CS_OWNDC;
windowStyle = WS_POPUPWINDOW|WS_SYSMENU|WS_CAPTION;
//windowStyle = WS_OVERLAPPEDWINDOW;
icon = LoadIcon(0, IDI_APPLICATION);
cursor = LoadCursor(NULL, IDC_ARROW);
background = (HBRUSH)GetStockObject(BLACK_BRUSH);
//background = (HBRUSH)GetStockObject(BACKGROUND_BLUE);(HBRUSH)(COLOR_WINDOW+1);
}
};
public:
static HINSTANCE GetHINSTANCE ();
static HWND GetHWND ();
static HWND GetParent ();
static bool CreateWin (WINDOW_INIT_DESC&);
static bool CreateConsoleWindow (bool redirectStdOut = true, const wchar_t* title = L"Debug Output");
static unsigned int GetWidth();
static unsigned int GetHeight();
2013-12-12 09:33:59 +01:00
/** Procces window messages if avalible. If the return value was false, the window was destroyed. */
static bool Frame ();
};
#endif