//my_header.h
#ifndef __MY_HEADER_
#define __MY_HEADER_
#include<windows.h>
#include<strsafe.h>
#include<tchar.h>
#define WIDTH 800
#define HEIGHT 600
#endif
//main.cpp
#include"my_header.h"
HWND hwnd = NULL;
TCHAR szClassName[32] = TEXT("my_class");
LRESULT CALLBACK WndProc(HWND hwnd, UINT message, WPARAM wparam, LPARAM lparam);
bool RegisterMyClass(HWND hwnd, HINSTANCE hInstance, int nShow);
int WINAPI wWinMain(HINSTANCE hinstance, HINSTANCE prehInstance, LPTSTR cmdLine, int nShow)
{
MSG msg;
if (!RegisterMyClass(hwnd, hinstance, nShow))
return 0;
while (GetMessage(&msg, NULL, 0, 0))
{
TranslateMessage(&msg);
DispatchMessage(&msg);
}
return msg.wParam;
}
bool RegisterMyClass(HWND hwnd, HINSTANCE hInstance, int nShow)
{
WNDCLASS wndclass = { sizeof(wndclass) };
wndclass.hbrBackground = (HBRUSH)GetStockObject(BLACK_