1 /*
2 * Copyright 1998 Douglas Ridgway
3 *
4 * This library is free software; you can redistribute it and/or
5 * modify it under the terms of the GNU Lesser General Public
6 * License as published by the Free Software Foundation; either
7 * version 2.1 of the License, or (at your option) any later version.
8 *
9 * This library is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
12 * Lesser General Public License for more details.
13 *
14 * You should have received a copy of the GNU Lesser General Public
15 * License along with this library; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
17 */
18
19 #include <windows.h> /* required for all Windows applications */
20 #include "globals.h" /* prototypes specific to this application */
21
22
23 int APIENTRY WinMain(HINSTANCE hInstance,
24 HINSTANCE hPrevInstance,
25 LPSTR lpCmdLine,
26 int nCmdShow)
27 {
28 MSG msg;
29 HANDLE hAccelTable;
30
31 /* Other instances of app running? */
32 if (!hPrevInstance)
33 {
34 /* stuff to be done once */
35 if (!InitApplication(hInstance))
36 {
37 return FALSE; /* exit */
38 }
39 }
40
41 /* stuff to be done every time */
42 if (!InitInstance(hInstance, nCmdShow))
43 {
44 return FALSE;
45 }
46
47 hAccelTable = LoadAccelerators(hInstance, szAppName);
48
49 /* Main loop */
50 /* Acquire and dispatch messages until a WM_QUIT message is received */
51 while (GetMessage(&msg, NULL, 0, 0))
52 {
53 /* Add other Translation functions (for modeless dialogs
54 and/or MDI windows) here. */
55
56 if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
57 {
58 TranslateMessage(&msg);
59 DispatchMessage(&msg);
60 }
61 }
62
63 /* Add module specific instance free/delete functions here */
64
65 /* Returns the value from PostQuitMessage */
66 return msg.wParam;
67 }
68
This page was automatically generated by the
LXR engine.
Visit the LXR main site for more
information.