Guest User

main.cpp

a guest
Dec 21st, 2015
244
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include "KWnd.h"
  2.  
  3. LRESULT CALLBACK WndProc(HWND, UINT, WPARAM, LPARAM);
  4.  
  5. int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lCmdLine, int nCmdShow) {
  6.     MSG msg;
  7.     KWnd Window("Hello, World", hInstance, nCmdShow, WndProc);
  8.  
  9.     while (GetMessage(&msg, NULL, 0, 0)) {
  10.         TranslateMessage(&msg);
  11.         DispatchMessage(&msg);
  12.     }
  13.  
  14.     return msg.wParam;
  15. }
  16.  
  17. LRESULT CALLBACK WndProc(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
  18.     return DefWindowProc(hWnd, uMsg, wParam, lParam);
  19. }
Add Comment
Please, Sign In to add comment