Automatic install script, which automatically configures and compiles
[wine.git] / programs / view / winmain.c
blob70e4b8cb40892c407c33bde61cef3fd1090b61c8
1 #include <windows.h> /* required for all Windows applications */
2 #include "globals.h" /* prototypes specific to this application */
5 int APIENTRY WinMain(HINSTANCE hInstance,
6 HINSTANCE hPrevInstance,
7 LPSTR lpCmdLine,
8 int nCmdShow)
10 MSG msg;
11 HANDLE hAccelTable;
13 /* Other instances of app running? */
14 if (!hPrevInstance)
16 /* stuff to be done once */
17 if (!InitApplication(hInstance))
19 return FALSE; /* exit */
23 /* stuff to be done every time */
24 if (!InitInstance(hInstance, nCmdShow))
26 return FALSE;
29 hAccelTable = LoadAccelerators(hInstance, szAppName);
31 /* Main loop */
32 /* Acquire and dispatch messages until a WM_QUIT message is received */
33 while (GetMessage(&msg, NULL, 0, 0))
35 /* Add other Translation functions (for modeless dialogs
36 and/or MDI windows) here. */
38 if (!TranslateAccelerator(msg.hwnd, hAccelTable, &msg))
40 TranslateMessage(&msg);
41 DispatchMessage(&msg);
45 /* Add module specific instance free/delete functions here */
47 /* Returns the value from PostQuitMessage */
48 return msg.wParam;