Release 0.0.2
[wine/multimedia.git] / winetest / main.c
blobde7d73839d7386e877f58331895c42367b995d7b
1 /* MAIN.C
3 * PURPOSE:
5 * FUNCTIONS:
6 * WinMain() - Initializes app, calls all other functions.
7 */
9 #include <windows.h>
10 #include <stdarg.h>
11 #include <stdio.h>
12 #include <stdlib.h>
15 * Globals
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); */
23 /* WinMain
25 int PASCAL
26 WinMain(HANDLE hInstance, HANDLE hPrevInstance, LPSTR lpszCmdLine, int cmdShow)
28 DebugPrintString("Hello\n");
30 return 0;
31 #if 0
32 HWND hwnd;
33 MSG msg;
34 WNDCLASS wndclass;
36 if (hPrevInstance)
38 MessageBox(NULL, "This application is already running.", szAppName,
39 MB_OK | MB_ICONEXCLAMATION | MB_SYSTEMMODAL);
40 return NULL;
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",
57 WS_OVERLAPPEDWINDOW,
58 CW_USEDEFAULT,
59 CW_USEDEFAULT,
60 CW_USEDEFAULT,
61 CW_USEDEFAULT,
62 NULL,
63 NULL,
64 hInstance,
65 NULL);
66 ShowWindow(hwnd, cmdShow);
67 UpdateWindow(hwnd);
69 while (GetMessage(&msg, NULL, NULL, NULL))
71 TranslateMessage((LPMSG) &msg);
72 DispatchMessage((LPMSG) &msg);
75 return msg.wParam;
76 #endif /* 0 */
80 /* WineTestWndProc
82 long FAR PASCAL
83 WineTestWndProc(HWND hwnd, unsigned message, WORD wParam, LONG lParam)
85 static HANDLE hInstance;
86 FARPROC DlgProcInst;
87 LONG parm;
89 switch (message)
91 case WM_CREATE:
92 hInstance = ((LPCREATESTRUCT) lParam)->hInstance;
93 return 0;
95 case WM_DESTROY:
96 PostQuitMessage(0);
97 return 0;
100 return DefWindowProc(hwnd, message, wParam, lParam);