3 LRESULT CALLBACK wproc(HWND,UINT,WPARAM,LPARAM);
5 int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance,
6 PSTR szCmdLine, int iCmdShow)
8 static char szAppName[]="HolaWin";
13 wndclass.style = CS_DBLCLKS | CS_HREDRAW | CS_VREDRAW;
14 wndclass.lpfnWndProc = (WNDPROC)wproc;
15 wndclass.cbClsExtra =0;
16 wndclass.cbWndExtra =0;
17 wndclass.hInstance =0;
20 wndclass.hbrBackground =(HBRUSH)GetStockObject(LTGRAY_BRUSH);
21 wndclass.lpszMenuName =NULL;
22 wndclass.lpszClassName = szAppName;
24 RegisterClass(&wndclass);
25 hwnd=CreateWindowEx(0L,
28 WS_OVERLAPPEDWINDOW | WS_VISIBLE,
39 ShowWindow(hwnd,iCmdShow);
42 while (GetMessage(&msg,NULL,0,0)) {
43 TranslateMessage(&msg);
44 DispatchMessage(&msg);
48 LRESULT CALLBACK wproc(HWND hwnd, UINT iMsg, WPARAM wParam, LPARAM lParam)
58 /*case WM_MOUSEFIRST:*/
59 hdc=BeginPaint(hwnd,&ps);
60 GetClientRect(hwnd,&rect);
61 DrawText(hdc, "Hola, NOS", -1, &rect,
62 DT_SINGLELINE|DT_CENTER|DT_VCENTER);
69 return DefWindowProc(hwnd,iMsg,wParam,lParam);