absence_thelab
diff src/nwt/startup.h @ 0:1cffe3409164
initial commit
author | John Tsiombikas <nuclear@member.fsf.org> |
---|---|
date | Thu, 23 Oct 2014 01:46:07 +0300 |
parents | |
children |
line diff
1.1 --- /dev/null Thu Jan 01 00:00:00 1970 +0000 1.2 +++ b/src/nwt/startup.h Thu Oct 23 01:46:07 2014 +0300 1.3 @@ -0,0 +1,33 @@ 1.4 +#ifndef _STARTUP_H_ 1.5 +#define _STARTUP_H_ 1.6 + 1.7 +#include <windows.h> 1.8 +#include "nucwin.h" 1.9 + 1.10 +int main(); 1.11 +void RegisterWindowClasses(); 1.12 + 1.13 +int WINAPI WinMain(HINSTANCE hInst, HINSTANCE hPrev, LPSTR CmdLine, int ShowCmd) { 1.14 + Arguments = CmdLine; 1.15 + RegisterWindowClasses(); 1.16 + return main(); 1.17 +} 1.18 + 1.19 +void RegisterWindowClasses() { 1.20 + WNDCLASSEX wc; 1.21 + wc.cbSize = sizeof(WNDCLASSEX); 1.22 + wc.cbClsExtra = 0; 1.23 + wc.cbWndExtra = 0; 1.24 + wc.hbrBackground = (HBRUSH)COLOR_WINDOW; 1.25 + wc.hCursor = LoadCursor(NULL, IDC_ARROW); 1.26 + wc.hIcon = LoadIcon(NULL, IDI_APPLICATION); 1.27 + wc.hIconSm = wc.hIcon; 1.28 + wc.hInstance = GetModuleHandle(0); 1.29 + wc.lpfnWndProc = MainHandler; 1.30 + wc.lpszClassName = "NucWin"; 1.31 + wc.lpszMenuName = NULL; 1.32 + wc.style = CS_HREDRAW | CS_VREDRAW; 1.33 + RegisterClassEx(&wc); 1.34 +} 1.35 + 1.36 +#endif // _STARTUP_H_ 1.37 \ No newline at end of file