6 * WinMain() - Initializes app, calls all other functions.
17 char szAppName
[] = "WineTest";
19 extern long FAR PASCAL
WineTestWndProc(HWND hwnd
, unsigned message
,
20 WORD wParam
, LONG lParam
);
21 /* extern void FAR __cdecl DebugPrintString(const char FAR *str); */
26 WinMain(HANDLE hInstance
, HANDLE hPrevInstance
, LPSTR lpszCmdLine
, int cmdShow
)
28 DebugPrintString("Hello\n");
38 MessageBox(NULL
, "This application is already running.", szAppName
,
39 MB_OK
| MB_ICONEXCLAMATION
| MB_SYSTEMMODAL
);
43 wndclass
.style
= CS_HREDRAW
| CS_VREDRAW
;
44 wndclass
.lpfnWndProc
= WineTestWndProc
;
45 wndclass
.cbClsExtra
= 0;
46 wndclass
.cbWndExtra
= 0;
47 wndclass
.hInstance
= hInstance
;
48 wndclass
.hIcon
= LoadIcon(NULL
, IDI_APPLICATION
);
49 wndclass
.hCursor
= LoadCursor(NULL
, IDC_ARROW
);
50 wndclass
.hbrBackground
= GetStockObject(WHITE_BRUSH
);
51 wndclass
.lpszMenuName
= "MainMenu";
52 wndclass
.lpszClassName
= szAppName
;
54 RegisterClass(&wndclass
);
56 hwnd
= CreateWindow(szAppName
, "Wine Tester",
66 ShowWindow(hwnd
, cmdShow
);
69 while (GetMessage(&msg
, NULL
, NULL
, NULL
))
71 TranslateMessage((LPMSG
) &msg
);
72 DispatchMessage((LPMSG
) &msg
);
83 WineTestWndProc(HWND hwnd
, unsigned message
, WORD wParam
, LONG lParam
)
85 static HANDLE hInstance
;
92 hInstance
= ((LPCREATESTRUCT
) lParam
)->hInstance
;
100 return DefWindowProc(hwnd
, message
, wParam
, lParam
);