Code directory changes

This commit is contained in:
Vulpovile
2021-03-04 21:48:29 -08:00
parent 8bf27c6412
commit 12843a0890
87 changed files with 224 additions and 510 deletions

View File

@@ -0,0 +1,32 @@
#include "WindowFunctions.h"
#include <sstream>
#include <string>
using namespace std;
bool createWindowClass(const char* name,WNDPROC proc,HMODULE hInstance)
{
WNDCLASSEX wc;
wc.cbSize = sizeof(WNDCLASSEX);
wc.style = 0;
wc.lpfnWndProc = proc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance = hInstance;
wc.hIcon = LoadIcon(NULL, IDI_APPLICATION);
wc.hCursor = LoadCursor(NULL, IDC_ARROW);
wc.hbrBackground = (HBRUSH)(COLOR_WINDOW);
wc.lpszMenuName = NULL;
wc.lpszClassName = name;
wc.hIconSm = LoadIcon(NULL, IDI_APPLICATION);
if (!RegisterClassEx (&wc))
{
stringstream errMsg;
errMsg<<"Failed to register " << name;
MessageBox(NULL, errMsg.str().c_str(),"Dynamica Crash", MB_OK);
return false;
}
return true;
}