1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43
|
#include <windows.h>
#include <wingdi.h>
LRESULT CALLBACK WndProc( HWND hWnd, UINT messg,
WPARAM wParam, LPARAM lParam )
{
}
int WINAPI WinMain(HINSTANCE hInst,HINSTANCE hPreInst,LPSTR lpszCmdLine,int nCmdShow )
{
MessageBox(NULL,"Wilt u sluiten?","Aan u de keuze",MB_OKCANCEL | MB_ICONQUESTION);
//set class-window
WNDCLASSEX wc;
wc.cbSize = sizeof(WNDCLASSEX);//size of object
wc.style=0;//no style
wc.lpfnWndProc=WndProc;
wc.cbClsExtra = 0;
wc.cbWndExtra = 0;
wc.hInstance=hInst;
wc.hIcon = LoadIcon(NULL, IDI_EXCLAMATION);
wc.hCursor = LoadCursor(NULL,IDC_ARROW);
wc.hbrBackground =(HBRUSH)GetStockObject(WHITE_BRUSH);
wc.lpszMenuName = NULL;
wc.lpszClassName = TEXT("WINCLASS1");
wc.hIconSm = LoadIcon(NULL, IDI_EXCLAMATION);
//register window-class
RegisterClassEx(&wc);
//make window
HWND hWnd;
hWnd = CreateWindowEx
(NULL,
"WINCLASS1",
"A Basic Window",
WS_OVERLAPPEDWINDOW | WS_VISIBLE,10,
10,
200,
200,
NULL,
NULL,
hInst,
NULL);
return 0;
}
|