cabinet: Add initial tests for FDI.
[wine.git] / programs / view / winmain.c
blob0d0c01115e3ddcb9ec2d29240619fd04ee8ad755
1 /*
2 * Copyright 1998 Douglas Ridgway
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.
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.
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
19 #include <windows.h> /* required for all Windows applications */
20 #include "globals.h" /* prototypes specific to this application */
23 int APIENTRY WinMain(HINSTANCE hInstance,
24 HINSTANCE hPrevInstance,
25 LPSTR lpCmdLine,
26 int nCmdShow)
28 MSG msg;
29 HANDLE hAccelTable;
31 /* Other instances of app running? */
32 if (!hPrevInstance)
34 /* stuff to be done once */
35 if (!InitApplication(hInstance))
37 return FALSE; /* exit */
41 /* stuff to be done every time */
42 if (!InitInstance(hInstance, nCmdShow))
44 return FALSE;
47 hAccelTable = LoadAccelerators(hInstance, szAppName);
49 /* Main loop */
50 /* Acquire and dispatch messages until a WM_QUIT message is received */
51 while (GetMessage(&msg, NULL, 0, 0))
53 /* Add other Translation functions (for modeless dialogs
54 and/or MDI windows) here. */
56 if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
58 TranslateMessage(&msg);
59 DispatchMessage(&msg);
63 /* Add module specific instance free/delete functions here */
65 /* Returns the value from PostQuitMessage */
66 return msg.wParam;