#include "EzWinAPIBuilders.h" WNDCLASSEX EzCreateClass(LPCWSTR name, WNDPROC messageLoop, HINSTANCE instance, LPCWSTR classIcon, LPCWSTR cursor) { WNDCLASSEX wc; wc.style = 0; wc.cbSize = sizeof(WNDCLASSEX); wc.lpfnWndProc = messageLoop; wc.cbClsExtra = 0; wc.cbWndExtra = 0; wc.hInstance = instance; wc.hIcon = LoadIcon(NULL, classIcon); wc.hCursor = LoadCursor(NULL, cursor); wc.hbrBackground = (HBRUSH)(COLOR_WINDOW); wc.lpszMenuName = NULL; wc.lpszClassName = name; wc.cbWndExtra = 0; wc.hIconSm = LoadIcon(NULL, IDI_ERROR); return wc; } HWND EzCreateWindow(WNDCLASSEX windowClass, HINSTANCE instance, LPCWSTR windowTitle, DWORD windowStyles, int windowWidth, int windowHeight, HWND parent) { return CreateWindowEx(WS_EX_CLIENTEDGE, windowClass.lpszClassName, windowTitle, windowStyles, CW_USEDEFAULT, CW_USEDEFAULT, windowWidth, windowHeight, parent, NULL, instance, NULL); } HWND EzCreateButton(LPCWSTR label, int posX, int posY, int sizeW, int sizeH, HWND mainWindow) { return CreateWindowEx(0, L"BUTTON", label, WS_CHILD | WS_VISIBLE, posX, posY, sizeW, sizeH, mainWindow, NULL, NULL, NULL); } HWND EzCreateLabel(LPCWSTR startingContent, int posX, int posY, int sizeW, int sizeH, HWND mainWindow) { return CreateWindowEx(0, L"STATIC", startingContent, WS_CHILD | WS_VISIBLE, posX, posY, sizeW, sizeH, mainWindow, NULL, NULL, NULL); }