C++ Game Framework  2013-06-04
CGF is a DirectX 11 game framework, built in C++ and DirectX 11. This is used to contain many to the DirectX functionality and wrap them into a framework to make game development easier.
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
Window.h
Go to the documentation of this file.
1 // Filename: Window.h
4 
5 //Preprocessor directive designed to cause the current source file to be included only once in a single compilation
6 #pragma once
7 
8 //Includes
9 #include <windows.h>
10 #include "CGFInclude.h"
11 
12 namespace CGF
13 {
15  {
16  public:
17  Window();
18  ~Window();
19 
20  bool Initialize(const int width, const int height, const bool isFullscreen);
21  bool Shutdown();
22 
23  static LRESULT CALLBACK WindowProcecure(HWND, UINT, WPARAM, LPARAM);
24  LRESULT CALLBACK MessageHandler(HWND, UINT, WPARAM, LPARAM);
25 
26  HWND* GetWindowHandlePtr() { return &m_hwnd; }
27  HWND GetWindowHandle() { return m_hwnd; }
28  void SetMouseVisible(const bool isVisible) { ShowCursor(isVisible); }
29  HINSTANCE* GetHInstancePtr() { return &m_hInstance; }
30  HINSTANCE GetHInstance() { return m_hInstance; }
31 
32  private:
33  HINSTANCE m_hInstance;
34  LPCWSTR m_applicationName;
35  HWND m_hwnd;
37  bool m_isFullscreen;
38  };
39 
40  static Window* m_currentWindow = 0;
41 }