1 | /* $Id: animate.cpp,v 1.3 2000-05-22 17:25:06 cbratschi Exp $ */
|
---|
2 | /*
|
---|
3 | * Animation control
|
---|
4 | *
|
---|
5 | * Copyright 1998, 1999 Eric Kohl
|
---|
6 | * 1999 Eric Pouech
|
---|
7 | * Copyright 1999 Achim Hasenmueller
|
---|
8 | * Copyright 1999 Christoph Bratschi
|
---|
9 | *
|
---|
10 | * TODO:
|
---|
11 | * - check for the 'rec ' list in some AVI files
|
---|
12 | * - implement some missing flags (ACS_TRANSPARENT and ACS_CENTER)
|
---|
13 | * - protection between service thread and wndproc messages handling
|
---|
14 | * concurrent access to infoPtr
|
---|
15 | *
|
---|
16 | * Status: complete (read above)
|
---|
17 | * Version: 5.00
|
---|
18 | */
|
---|
19 |
|
---|
20 | /*
|
---|
21 | - Corel WINE 20000513 level
|
---|
22 | */
|
---|
23 |
|
---|
24 | #include "winbase.h"
|
---|
25 | #include "commctrl.h"
|
---|
26 | #include "comctl32.h"
|
---|
27 | #include "driver.h"
|
---|
28 | #include "mmsystem.h"
|
---|
29 | #include "ccbase.h"
|
---|
30 | #include "animate.h"
|
---|
31 |
|
---|
32 | HINSTANCE hMSVFW32 = 0;
|
---|
33 |
|
---|
34 | HINSTANCE hWINMM = 0;
|
---|
35 | static LONG (*WINAPI WINMM_mmioRead)(HMMIO,HPSTR,LONG) = 0;
|
---|
36 | static LONG (*WINAPI WINMM_mmioSeek)(HMMIO,LONG,INT) = 0;
|
---|
37 | static MMRESULT (*WINAPI WINMM_mmioClose)(HMMIO,UINT) = 0;
|
---|
38 | static HMMIO (*WINAPI WINMM_mmioOpenA)(LPSTR ,MMIOINFO*,DWORD) = 0;
|
---|
39 | static HMMIO (*WINAPI WINMM_mmioOpenW)(LPWSTR,MMIOINFO*,DWORD) = 0;
|
---|
40 | static UINT (*WINAPI WINMM_mmioDescend)(HMMIO,MMCKINFO*,const MMCKINFO*,UINT) = 0;
|
---|
41 | static UINT (*WINAPI WINMM_mmioAscend)(HMMIO,MMCKINFO*,UINT) = 0;
|
---|
42 |
|
---|
43 | #define ANIMATE_GetInfoPtr(hwnd) ((ANIMATE_INFO*)getInfoPtr(hwnd))
|
---|
44 |
|
---|
45 | static BOOL ANIMATE_LoadMSVFW32(VOID)
|
---|
46 | {
|
---|
47 | if (hMSVFW32) return TRUE;
|
---|
48 |
|
---|
49 | hMSVFW32 = LoadLibraryA("msvfw32.dll");
|
---|
50 |
|
---|
51 | return hMSVFW32;
|
---|
52 | }
|
---|
53 |
|
---|
54 | static VOID ANIMATE_UnloadMSVFW32(VOID)
|
---|
55 | {
|
---|
56 | if (hMSVFW32)
|
---|
57 | {
|
---|
58 | FreeLibrary(hMSVFW32);
|
---|
59 | hMSVFW32 = 0;
|
---|
60 | }
|
---|
61 | }
|
---|
62 |
|
---|
63 | static BOOL ANIMATE_LoadWINMM(VOID)
|
---|
64 | {
|
---|
65 | if (hWINMM) return TRUE;
|
---|
66 |
|
---|
67 | hWINMM = LoadLibraryA("WINMM");
|
---|
68 | if (!hWINMM) return FALSE;
|
---|
69 |
|
---|
70 | *(VOID**)&WINMM_mmioRead = (VOID*)GetProcAddress(hWINMM,"mmioRead");
|
---|
71 | *(VOID**)&WINMM_mmioSeek = (VOID*)GetProcAddress(hWINMM,"mmioSeek");
|
---|
72 | *(VOID**)&WINMM_mmioClose = (VOID*)GetProcAddress(hWINMM,"mmioClose");
|
---|
73 | *(VOID**)&WINMM_mmioOpenA = (VOID*)GetProcAddress(hWINMM,"mmioOpenA");
|
---|
74 | *(VOID**)&WINMM_mmioOpenW = (VOID*)GetProcAddress(hWINMM,"mmioOpenW");
|
---|
75 | *(VOID**)&WINMM_mmioDescend = (VOID*)GetProcAddress(hWINMM,"mmioDescend");
|
---|
76 | *(VOID**)&WINMM_mmioAscend = (VOID*)GetProcAddress(hWINMM,"mmioAscend");
|
---|
77 |
|
---|
78 | return TRUE;
|
---|
79 | }
|
---|
80 |
|
---|
81 | static VOID ANIMATE_UnloadWINMM(VOID)
|
---|
82 | {
|
---|
83 | if (hWINMM)
|
---|
84 | {
|
---|
85 | FreeLibrary(hWINMM);
|
---|
86 | hWINMM = 0;
|
---|
87 | *(VOID**)&WINMM_mmioRead = NULL;
|
---|
88 | *(VOID**)&WINMM_mmioSeek = NULL;
|
---|
89 | *(VOID**)&WINMM_mmioClose = NULL;
|
---|
90 | *(VOID**)&WINMM_mmioOpenA = NULL;
|
---|
91 | *(VOID**)&WINMM_mmioOpenW = NULL;
|
---|
92 | *(VOID**)&WINMM_mmioDescend = NULL;
|
---|
93 | *(VOID**)&WINMM_mmioAscend = NULL;
|
---|
94 | }
|
---|
95 | }
|
---|
96 |
|
---|
97 | static BOOL ANIMATE_LoadRes(ANIMATE_INFO *infoPtr,HINSTANCE hInst,LPWSTR lpName,BOOL unicode)
|
---|
98 | {
|
---|
99 | HRSRC hrsrc;
|
---|
100 | MMIOINFO mminfo;
|
---|
101 | LPVOID lpAvi;
|
---|
102 |
|
---|
103 | if (unicode)
|
---|
104 | hrsrc = FindResourceW(hInst,lpName,(LPWSTR)L"AVI");
|
---|
105 | else
|
---|
106 | hrsrc = FindResourceA(hInst,(LPCSTR)lpName,"AVI");
|
---|
107 | if (!hrsrc) return FALSE;
|
---|
108 |
|
---|
109 | infoPtr->hRes = LoadResource(hInst, hrsrc);
|
---|
110 | if (!infoPtr->hRes)
|
---|
111 | return FALSE;
|
---|
112 |
|
---|
113 | lpAvi = LockResource (infoPtr->hRes);
|
---|
114 | if (!lpAvi) return FALSE;
|
---|
115 |
|
---|
116 | memset(&mminfo, 0, sizeof(mminfo));
|
---|
117 | mminfo.fccIOProc = FOURCC_MEM;
|
---|
118 | mminfo.pchBuffer = (LPSTR)lpAvi;
|
---|
119 | mminfo.cchBuffer = SizeofResource(hInst, hrsrc);
|
---|
120 | infoPtr->hMMio = WINMM_mmioOpenA(NULL, &mminfo, MMIO_READ);
|
---|
121 |
|
---|
122 | if (!infoPtr->hMMio) {
|
---|
123 | GlobalFree((HGLOBAL)lpAvi);
|
---|
124 | return FALSE;
|
---|
125 | }
|
---|
126 |
|
---|
127 | return TRUE;
|
---|
128 | }
|
---|
129 |
|
---|
130 | static BOOL ANIMATE_LoadFile(ANIMATE_INFO *infoPtr,LPWSTR lpName,BOOL unicode)
|
---|
131 | {
|
---|
132 | if (unicode)
|
---|
133 | infoPtr->hMMio = WINMM_mmioOpenW(lpName,NULL,MMIO_ALLOCBUF | MMIO_READ | MMIO_DENYWRITE);
|
---|
134 | else
|
---|
135 | infoPtr->hMMio = WINMM_mmioOpenA((LPSTR)lpName,NULL,MMIO_ALLOCBUF | MMIO_READ | MMIO_DENYWRITE);
|
---|
136 |
|
---|
137 | if (!infoPtr->hMMio)
|
---|
138 | return FALSE;
|
---|
139 |
|
---|
140 | return TRUE;
|
---|
141 | }
|
---|
142 |
|
---|
143 | static LRESULT ANIMATE_DoStop(ANIMATE_INFO *infoPtr)
|
---|
144 | {
|
---|
145 | EnterCriticalSection(&infoPtr->cs);
|
---|
146 |
|
---|
147 | /* should stop playing */
|
---|
148 | if (infoPtr->hThread)
|
---|
149 | {
|
---|
150 | infoPtr->stopThread = TRUE;
|
---|
151 | infoPtr->hThread = 0;
|
---|
152 | }
|
---|
153 | if (infoPtr->uTimer) {
|
---|
154 | KillTimer(infoPtr->hWnd, infoPtr->uTimer);
|
---|
155 | infoPtr->uTimer = 0;
|
---|
156 | }
|
---|
157 |
|
---|
158 | LeaveCriticalSection(&infoPtr->cs);
|
---|
159 |
|
---|
160 | sendCommand(infoPtr->hWnd,ACN_STOP);
|
---|
161 |
|
---|
162 | return TRUE;
|
---|
163 | }
|
---|
164 |
|
---|
165 |
|
---|
166 | static void ANIMATE_Free(ANIMATE_INFO *infoPtr)
|
---|
167 | {
|
---|
168 | if (infoPtr->hMMio) {
|
---|
169 | ANIMATE_DoStop(infoPtr);
|
---|
170 | WINMM_mmioClose(infoPtr->hMMio, 0);
|
---|
171 | if (infoPtr->hRes) {
|
---|
172 | FreeResource(infoPtr->hRes);
|
---|
173 | infoPtr->hRes = 0;
|
---|
174 | }
|
---|
175 | if (infoPtr->lpIndex) {
|
---|
176 | HeapFree(GetProcessHeap(), 0, infoPtr->lpIndex);
|
---|
177 | infoPtr->lpIndex = NULL;
|
---|
178 | }
|
---|
179 | if (infoPtr->hic) {
|
---|
180 | (infoPtr->fnICClose)(infoPtr->hic);
|
---|
181 | infoPtr->hic = 0;
|
---|
182 | }
|
---|
183 | if (infoPtr->inbih) {
|
---|
184 | HeapFree(GetProcessHeap(), 0, infoPtr->inbih);
|
---|
185 | infoPtr->inbih = NULL;
|
---|
186 | }
|
---|
187 | if (infoPtr->outbih) {
|
---|
188 | HeapFree(GetProcessHeap(), 0, infoPtr->outbih);
|
---|
189 | infoPtr->outbih = NULL;
|
---|
190 | }
|
---|
191 | HeapFree(GetProcessHeap(), 0, infoPtr->indata);
|
---|
192 | HeapFree(GetProcessHeap(), 0, infoPtr->outdata);
|
---|
193 | infoPtr->indata = infoPtr->outdata = NULL;
|
---|
194 | infoPtr->hWnd = 0;
|
---|
195 | infoPtr->hMMio = 0;
|
---|
196 | memset(&infoPtr->mah, 0, sizeof(infoPtr->mah));
|
---|
197 | memset(&infoPtr->ash, 0, sizeof(infoPtr->ash));
|
---|
198 | infoPtr->nFromFrame = infoPtr->nToFrame = infoPtr->nLoop = infoPtr->currFrame = 0;
|
---|
199 | }
|
---|
200 | }
|
---|
201 |
|
---|
202 |
|
---|
203 | static LRESULT ANIMATE_PaintFrame(ANIMATE_INFO* infoPtr, HDC hDC)
|
---|
204 | {
|
---|
205 | if (!hDC || !infoPtr->inbih)
|
---|
206 | return TRUE;
|
---|
207 | if (infoPtr->hic)
|
---|
208 | StretchDIBits(hDC, 0, 0, infoPtr->outbih->biWidth, infoPtr->outbih->biHeight,
|
---|
209 | 0, 0, infoPtr->outbih->biWidth, infoPtr->outbih->biHeight,
|
---|
210 | infoPtr->outdata, (LPBITMAPINFO)infoPtr->outbih, DIB_RGB_COLORS,
|
---|
211 | SRCCOPY);
|
---|
212 | else
|
---|
213 | StretchDIBits(hDC, 0, 0, infoPtr->inbih->biWidth, infoPtr->inbih->biHeight,
|
---|
214 | 0, 0, infoPtr->inbih->biWidth, infoPtr->inbih->biHeight,
|
---|
215 | infoPtr->indata, (LPBITMAPINFO)infoPtr->inbih, DIB_RGB_COLORS,
|
---|
216 | SRCCOPY);
|
---|
217 |
|
---|
218 | return TRUE;
|
---|
219 | }
|
---|
220 |
|
---|
221 | static LRESULT ANIMATE_DrawFrame(ANIMATE_INFO* infoPtr)
|
---|
222 | {
|
---|
223 | HDC hDC;
|
---|
224 |
|
---|
225 | //TRACE("Drawing frame %d (loop %d)\n", infoPtr->currFrame, infoPtr->nLoop);
|
---|
226 |
|
---|
227 | EnterCriticalSection(&infoPtr->cs);
|
---|
228 |
|
---|
229 | WINMM_mmioSeek(infoPtr->hMMio, infoPtr->lpIndex[infoPtr->currFrame], SEEK_SET);
|
---|
230 | WINMM_mmioRead(infoPtr->hMMio, (HPSTR)infoPtr->indata, infoPtr->ash.dwSuggestedBufferSize);
|
---|
231 |
|
---|
232 | if (infoPtr->hic &&
|
---|
233 | (infoPtr->fnICDecompress)(infoPtr->hic, 0, infoPtr->inbih, infoPtr->indata,
|
---|
234 | infoPtr->outbih, infoPtr->outdata) != ICERR_OK) {
|
---|
235 | LeaveCriticalSection(&infoPtr->cs);
|
---|
236 | //WARN("Decompression error\n");
|
---|
237 | return FALSE;
|
---|
238 | }
|
---|
239 |
|
---|
240 | if ((hDC = GetDC(infoPtr->hWnd)) != 0) {
|
---|
241 | ANIMATE_PaintFrame(infoPtr, hDC);
|
---|
242 | ReleaseDC(infoPtr->hWnd, hDC);
|
---|
243 | }
|
---|
244 |
|
---|
245 | if (infoPtr->currFrame++ >= infoPtr->nToFrame) {
|
---|
246 | infoPtr->currFrame = infoPtr->nFromFrame;
|
---|
247 | if (infoPtr->nLoop != -1) {
|
---|
248 | if (--infoPtr->nLoop == 0) {
|
---|
249 | ANIMATE_DoStop(infoPtr);
|
---|
250 | }
|
---|
251 | }
|
---|
252 | }
|
---|
253 | LeaveCriticalSection(&infoPtr->cs);
|
---|
254 |
|
---|
255 | return TRUE;
|
---|
256 | }
|
---|
257 |
|
---|
258 | static DWORD ANIMATE_ThreadFunc(LPDWORD lpdwParam)
|
---|
259 | {
|
---|
260 | HWND hwnd = (HWND)lpdwParam;
|
---|
261 | ANIMATE_INFO* infoPtr = ANIMATE_GetInfoPtr(hwnd);
|
---|
262 |
|
---|
263 | while (IsWindow(hwnd) && !infoPtr->stopThread)
|
---|
264 | {
|
---|
265 | EnterCriticalSection(&infoPtr->cs);
|
---|
266 | ANIMATE_DrawFrame(infoPtr);
|
---|
267 | LeaveCriticalSection(&infoPtr->cs);
|
---|
268 | Sleep(infoPtr->delay);
|
---|
269 | }
|
---|
270 |
|
---|
271 | return 0;
|
---|
272 | }
|
---|
273 |
|
---|
274 | static LRESULT ANIMATE_Play(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
---|
275 | {
|
---|
276 | ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(hWnd);
|
---|
277 |
|
---|
278 | /* nothing opened */
|
---|
279 | if (!infoPtr->hMMio)
|
---|
280 | return FALSE;
|
---|
281 |
|
---|
282 | if (infoPtr->hThread || infoPtr->uTimer) {
|
---|
283 | //FIXME("Already playing ? what should I do ??\n");
|
---|
284 | ANIMATE_DoStop(infoPtr);
|
---|
285 | }
|
---|
286 |
|
---|
287 | infoPtr->nFromFrame = (INT)LOWORD(lParam);
|
---|
288 | infoPtr->nToFrame = (INT)HIWORD(lParam);
|
---|
289 | infoPtr->nLoop = (INT)wParam;
|
---|
290 |
|
---|
291 | if (infoPtr->nToFrame == 0xFFFF)
|
---|
292 | infoPtr->nToFrame = infoPtr->mah.dwTotalFrames - 1;
|
---|
293 |
|
---|
294 | //TRACE("(repeat=%d from=%d to=%d);\n",
|
---|
295 | // infoPtr->nLoop, infoPtr->nFromFrame, infoPtr->nToFrame);
|
---|
296 |
|
---|
297 | if (infoPtr->nFromFrame >= infoPtr->nToFrame ||
|
---|
298 | infoPtr->nToFrame >= infoPtr->mah.dwTotalFrames)
|
---|
299 | return FALSE;
|
---|
300 |
|
---|
301 | infoPtr->currFrame = infoPtr->nFromFrame;
|
---|
302 |
|
---|
303 | if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_TIMER) {
|
---|
304 | //TRACE("Using a timer\n");
|
---|
305 | /* create a timer to display AVI */
|
---|
306 | infoPtr->uTimer = SetTimer(hWnd, 1, infoPtr->mah.dwMicroSecPerFrame / 1000, NULL);
|
---|
307 | } else
|
---|
308 | {
|
---|
309 | DWORD id;
|
---|
310 |
|
---|
311 | //TRACE("Using the service thread\n");
|
---|
312 | infoPtr->stopThread = FALSE;
|
---|
313 | infoPtr->delay = infoPtr->mah.dwMicroSecPerFrame+500;
|
---|
314 | infoPtr->hThread = CreateThread(NULL,0,(LPTHREAD_START_ROUTINE)ANIMATE_ThreadFunc,(LPVOID)hWnd,0,&id);
|
---|
315 | }
|
---|
316 |
|
---|
317 | sendCommand(infoPtr->hWnd,ACN_START);
|
---|
318 |
|
---|
319 | return TRUE;
|
---|
320 | }
|
---|
321 |
|
---|
322 |
|
---|
323 | static BOOL ANIMATE_GetAviInfo(ANIMATE_INFO *infoPtr)
|
---|
324 | {
|
---|
325 | MMCKINFO ckMainRIFF;
|
---|
326 | MMCKINFO mmckHead;
|
---|
327 | MMCKINFO mmckList;
|
---|
328 | MMCKINFO mmckInfo;
|
---|
329 | DWORD numFrame;
|
---|
330 | DWORD insize;
|
---|
331 |
|
---|
332 | if (WINMM_mmioDescend(infoPtr->hMMio, &ckMainRIFF, NULL, 0) != 0) {
|
---|
333 | //WARN("Can't find 'RIFF' chunk\n");
|
---|
334 | return FALSE;
|
---|
335 | }
|
---|
336 |
|
---|
337 | if ((ckMainRIFF.ckid != FOURCC_RIFF) ||
|
---|
338 | (ckMainRIFF.fccType != mmioFOURCC('A', 'V', 'I', ' '))) {
|
---|
339 | //WARN("Can't find 'AVI ' chunk\n");
|
---|
340 | return FALSE;
|
---|
341 | }
|
---|
342 |
|
---|
343 | mmckHead.fccType = mmioFOURCC('h', 'd', 'r', 'l');
|
---|
344 | if (WINMM_mmioDescend(infoPtr->hMMio, &mmckHead, &ckMainRIFF, MMIO_FINDLIST) != 0) {
|
---|
345 | //WARN("Can't find 'hdrl' list\n");
|
---|
346 | return FALSE;
|
---|
347 | }
|
---|
348 |
|
---|
349 | mmckInfo.ckid = mmioFOURCC('a', 'v', 'i', 'h');
|
---|
350 | if (WINMM_mmioDescend(infoPtr->hMMio, &mmckInfo, &mmckHead, MMIO_FINDCHUNK) != 0) {
|
---|
351 | //WARN("Can't find 'avih' chunk\n");
|
---|
352 | return FALSE;
|
---|
353 | }
|
---|
354 |
|
---|
355 | WINMM_mmioRead(infoPtr->hMMio, (LPSTR)&infoPtr->mah, sizeof(infoPtr->mah));
|
---|
356 | //TRACE("mah.dwMicroSecPerFrame=%ld\n", infoPtr->mah.dwMicroSecPerFrame);
|
---|
357 | //TRACE("mah.dwMaxBytesPerSec=%ld\n", infoPtr->mah.dwMaxBytesPerSec);
|
---|
358 | //TRACE("mah.dwPaddingGranularity=%ld\n", infoPtr->mah.dwPaddingGranularity);
|
---|
359 | //TRACE("mah.dwFlags=%ld\n", infoPtr->mah.dwFlags);
|
---|
360 | //TRACE("mah.dwTotalFrames=%ld\n", infoPtr->mah.dwTotalFrames);
|
---|
361 | //TRACE("mah.dwInitialFrames=%ld\n", infoPtr->mah.dwInitialFrames);
|
---|
362 | //TRACE("mah.dwStreams=%ld\n", infoPtr->mah.dwStreams);
|
---|
363 | //TRACE("mah.dwSuggestedBufferSize=%ld\n", infoPtr->mah.dwSuggestedBufferSize);
|
---|
364 | //TRACE("mah.dwWidth=%ld\n", infoPtr->mah.dwWidth);
|
---|
365 | //TRACE("mah.dwHeight=%ld\n", infoPtr->mah.dwHeight);
|
---|
366 | WINMM_mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
|
---|
367 |
|
---|
368 | mmckList.fccType = mmioFOURCC('s', 't', 'r', 'l');
|
---|
369 | if (WINMM_mmioDescend(infoPtr->hMMio, &mmckList, &mmckHead, MMIO_FINDLIST) != 0) {
|
---|
370 | //WARN("Can't find 'strl' list\n");
|
---|
371 | return FALSE;
|
---|
372 | }
|
---|
373 |
|
---|
374 | mmckInfo.ckid = mmioFOURCC('s', 't', 'r', 'h');
|
---|
375 | if (WINMM_mmioDescend(infoPtr->hMMio, &mmckInfo, &mmckList, MMIO_FINDCHUNK) != 0) {
|
---|
376 | //WARN("Can't find 'strh' chunk\n");
|
---|
377 | return FALSE;
|
---|
378 | }
|
---|
379 |
|
---|
380 | WINMM_mmioRead(infoPtr->hMMio, (LPSTR)&infoPtr->ash, sizeof(infoPtr->ash));
|
---|
381 | //TRACE("ash.fccType='%c%c%c%c'\n", LOBYTE(LOWORD(infoPtr->ash.fccType)),
|
---|
382 | // HIBYTE(LOWORD(infoPtr->ash.fccType)),
|
---|
383 | // LOBYTE(HIWORD(infoPtr->ash.fccType)),
|
---|
384 | // HIBYTE(HIWORD(infoPtr->ash.fccType)));
|
---|
385 | //TRACE("ash.fccHandler='%c%c%c%c'\n", LOBYTE(LOWORD(infoPtr->ash.fccHandler)),
|
---|
386 | // HIBYTE(LOWORD(infoPtr->ash.fccHandler)),
|
---|
387 | // LOBYTE(HIWORD(infoPtr->ash.fccHandler)),
|
---|
388 | // HIBYTE(HIWORD(infoPtr->ash.fccHandler)));
|
---|
389 | //TRACE("ash.dwFlags=%ld\n", infoPtr->ash.dwFlags);
|
---|
390 | //TRACE("ash.wPriority=%d\n", infoPtr->ash.wPriority);
|
---|
391 | //TRACE("ash.wLanguage=%d\n", infoPtr->ash.wLanguage);
|
---|
392 | //TRACE("ash.dwInitialFrames=%ld\n", infoPtr->ash.dwInitialFrames);
|
---|
393 | //TRACE("ash.dwScale=%ld\n", infoPtr->ash.dwScale);
|
---|
394 | //TRACE("ash.dwRate=%ld\n", infoPtr->ash.dwRate);
|
---|
395 | //TRACE("ash.dwStart=%ld\n", infoPtr->ash.dwStart);
|
---|
396 | //TRACE("ash.dwLength=%ld\n", infoPtr->ash.dwLength);
|
---|
397 | //TRACE("ash.dwSuggestedBufferSize=%ld\n", infoPtr->ash.dwSuggestedBufferSize);
|
---|
398 | //TRACE("ash.dwQuality=%ld\n", infoPtr->ash.dwQuality);
|
---|
399 | //TRACE("ash.dwSampleSize=%ld\n", infoPtr->ash.dwSampleSize);
|
---|
400 | //TRACE("ash.rcFrame=(%d,%d,%d,%d)\n", infoPtr->ash.rcFrame.top, infoPtr->ash.rcFrame.left,
|
---|
401 | // infoPtr->ash.rcFrame.bottom, infoPtr->ash.rcFrame.right);
|
---|
402 | WINMM_mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
|
---|
403 |
|
---|
404 | mmckInfo.ckid = mmioFOURCC('s', 't', 'r', 'f');
|
---|
405 | if (WINMM_mmioDescend(infoPtr->hMMio, &mmckInfo, &mmckList, MMIO_FINDCHUNK) != 0) {
|
---|
406 | //WARN("Can't find 'strh' chunk\n");
|
---|
407 | return FALSE;
|
---|
408 | }
|
---|
409 |
|
---|
410 | infoPtr->inbih = (BITMAPINFOHEADER*)HeapAlloc(GetProcessHeap(), 0, mmckInfo.cksize);
|
---|
411 | if (!infoPtr->inbih) {
|
---|
412 | //WARN("Can't alloc input BIH\n");
|
---|
413 | return FALSE;
|
---|
414 | }
|
---|
415 |
|
---|
416 | WINMM_mmioRead(infoPtr->hMMio, (LPSTR)infoPtr->inbih, mmckInfo.cksize);
|
---|
417 | //TRACE("bih.biSize=%ld\n", infoPtr->inbih->biSize);
|
---|
418 | //TRACE("bih.biWidth=%ld\n", infoPtr->inbih->biWidth);
|
---|
419 | //TRACE("bih.biHeight=%ld\n", infoPtr->inbih->biHeight);
|
---|
420 | //TRACE("bih.biPlanes=%d\n", infoPtr->inbih->biPlanes);
|
---|
421 | //TRACE("bih.biBitCount=%d\n", infoPtr->inbih->biBitCount);
|
---|
422 | //TRACE("bih.biCompression=%ld\n", infoPtr->inbih->biCompression);
|
---|
423 | //TRACE("bih.biSizeImage=%ld\n", infoPtr->inbih->biSizeImage);
|
---|
424 | //TRACE("bih.biXPelsPerMeter=%ld\n", infoPtr->inbih->biXPelsPerMeter);
|
---|
425 | //TRACE("bih.biYPelsPerMeter=%ld\n", infoPtr->inbih->biYPelsPerMeter);
|
---|
426 | //TRACE("bih.biClrUsed=%ld\n", infoPtr->inbih->biClrUsed);
|
---|
427 | //TRACE("bih.biClrImportant=%ld\n", infoPtr->inbih->biClrImportant);
|
---|
428 | WINMM_mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
|
---|
429 |
|
---|
430 | WINMM_mmioAscend(infoPtr->hMMio, &mmckList, 0);
|
---|
431 |
|
---|
432 | #if 0
|
---|
433 | /* an AVI has 0 or 1 video stream, and to be animated should not contain
|
---|
434 | * an audio stream, so only one strl is allowed
|
---|
435 | */
|
---|
436 | mmckList.fccType = mmioFOURCC('s', 't', 'r', 'l');
|
---|
437 | if (WINMM_mmioDescend(infoPtr->hMMio, &mmckList, &mmckHead, MMIO_FINDLIST) == 0) {
|
---|
438 | //WARN("There should be a single 'strl' list\n");
|
---|
439 | return FALSE;
|
---|
440 | }
|
---|
441 | #endif
|
---|
442 |
|
---|
443 | WINMM_mmioAscend(infoPtr->hMMio, &mmckHead, 0);
|
---|
444 |
|
---|
445 | /* no need to read optional JUNK chunk */
|
---|
446 |
|
---|
447 | mmckList.fccType = mmioFOURCC('m', 'o', 'v', 'i');
|
---|
448 | if (WINMM_mmioDescend(infoPtr->hMMio, &mmckList, &ckMainRIFF, MMIO_FINDLIST) != 0) {
|
---|
449 | //WARN("Can't find 'movi' list\n");
|
---|
450 | return FALSE;
|
---|
451 | }
|
---|
452 |
|
---|
453 | /* FIXME: should handle the 'rec ' LIST when present */
|
---|
454 |
|
---|
455 | infoPtr->lpIndex = (DWORD*)HeapAlloc(GetProcessHeap(), HEAP_ZERO_MEMORY,
|
---|
456 | infoPtr->mah.dwTotalFrames * sizeof(DWORD));
|
---|
457 | if (!infoPtr->lpIndex) {
|
---|
458 | //WARN("Can't alloc index array\n");
|
---|
459 | return FALSE;
|
---|
460 | }
|
---|
461 |
|
---|
462 | numFrame = insize = 0;
|
---|
463 | while (WINMM_mmioDescend(infoPtr->hMMio, &mmckInfo, &mmckList, 0) == 0 &&
|
---|
464 | numFrame < infoPtr->mah.dwTotalFrames) {
|
---|
465 | infoPtr->lpIndex[numFrame] = mmckInfo.dwDataOffset;
|
---|
466 | if (insize < mmckInfo.cksize)
|
---|
467 | insize = mmckInfo.cksize;
|
---|
468 | numFrame++;
|
---|
469 | WINMM_mmioAscend(infoPtr->hMMio, &mmckInfo, 0);
|
---|
470 | }
|
---|
471 | if (numFrame != infoPtr->mah.dwTotalFrames) {
|
---|
472 | //WARN("Found %ld frames (/%ld)\n", numFrame, infoPtr->mah.dwTotalFrames);
|
---|
473 | return FALSE;
|
---|
474 | }
|
---|
475 | if (insize > infoPtr->ash.dwSuggestedBufferSize) {
|
---|
476 | //WARN("insize=%ld suggestedSize=%ld\n", insize, infoPtr->ash.dwSuggestedBufferSize);
|
---|
477 | infoPtr->ash.dwSuggestedBufferSize = insize;
|
---|
478 | }
|
---|
479 |
|
---|
480 | infoPtr->indata = HeapAlloc(GetProcessHeap(), 0, infoPtr->ash.dwSuggestedBufferSize);
|
---|
481 | if (!infoPtr->indata) {
|
---|
482 | //WARN("Can't alloc input buffer\n");
|
---|
483 | return FALSE;
|
---|
484 | }
|
---|
485 |
|
---|
486 | return TRUE;
|
---|
487 | }
|
---|
488 |
|
---|
489 |
|
---|
490 | static BOOL ANIMATE_GetAviCodec(ANIMATE_INFO *infoPtr)
|
---|
491 | {
|
---|
492 | DWORD outSize;
|
---|
493 |
|
---|
494 | /* check uncompressed AVI */
|
---|
495 | if (infoPtr->ash.fccHandler == mmioFOURCC('D', 'I', 'B', ' ')) {
|
---|
496 | infoPtr->hic = 0;
|
---|
497 | return TRUE;
|
---|
498 | }
|
---|
499 |
|
---|
500 | /* try to get a decompressor for that type */
|
---|
501 | infoPtr->hic = (infoPtr->fnICOpen)(ICTYPE_VIDEO,
|
---|
502 | infoPtr->ash.fccHandler,
|
---|
503 | ICMODE_DECOMPRESS);
|
---|
504 | if (!infoPtr->hic) {
|
---|
505 | //WARN("Can't load codec for the file\n");
|
---|
506 | return FALSE;
|
---|
507 | }
|
---|
508 |
|
---|
509 | outSize = (infoPtr->fnICSendMessage)(infoPtr->hic,
|
---|
510 | ICM_DECOMPRESS_GET_FORMAT,
|
---|
511 | (DWORD)infoPtr->inbih, 0L);
|
---|
512 | infoPtr->outbih = (BITMAPINFOHEADER*)HeapAlloc(GetProcessHeap(), 0, outSize);
|
---|
513 | if (!infoPtr->outbih) {
|
---|
514 | //WARN("Can't alloc output BIH\n");
|
---|
515 | return FALSE;
|
---|
516 | }
|
---|
517 |
|
---|
518 | if ((infoPtr->fnICSendMessage)(infoPtr->hic, ICM_DECOMPRESS_GET_FORMAT,
|
---|
519 | (DWORD)infoPtr->inbih,
|
---|
520 | (DWORD)infoPtr->outbih) != ICERR_OK) {
|
---|
521 | //WARN("Can't get output BIH\n");
|
---|
522 | return FALSE;
|
---|
523 | }
|
---|
524 |
|
---|
525 | infoPtr->outdata = HeapAlloc(GetProcessHeap(), 0, infoPtr->outbih->biSizeImage);
|
---|
526 | if (!infoPtr->outdata) {
|
---|
527 | //WARN("Can't alloc output buffer\n");
|
---|
528 | return FALSE;
|
---|
529 | }
|
---|
530 |
|
---|
531 | if ((infoPtr->fnICSendMessage)(infoPtr->hic, ICM_DECOMPRESS_BEGIN,
|
---|
532 | (DWORD)infoPtr->inbih,
|
---|
533 | (DWORD)infoPtr->outbih) != ICERR_OK) {
|
---|
534 | //WARN("Can't begin decompression\n");
|
---|
535 | return FALSE;
|
---|
536 | }
|
---|
537 |
|
---|
538 | return TRUE;
|
---|
539 | }
|
---|
540 |
|
---|
541 | static LRESULT ANIMATE_Open(HWND hWnd, WPARAM wParam, LPARAM lParam,BOOL unicode)
|
---|
542 | {
|
---|
543 | ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(hWnd);
|
---|
544 | HINSTANCE hInstance = (HINSTANCE)wParam;
|
---|
545 |
|
---|
546 | ANIMATE_Free(infoPtr);
|
---|
547 |
|
---|
548 | if (!lParam) {
|
---|
549 | //TRACE("Closing avi!\n");
|
---|
550 | return TRUE;
|
---|
551 | }
|
---|
552 |
|
---|
553 | if (!hInstance)
|
---|
554 | hInstance = GetWindowLongA(hWnd, GWL_HINSTANCE);
|
---|
555 |
|
---|
556 | if (HIWORD(lParam)) {
|
---|
557 | //TRACE("(\"%s\");\n", (LPSTR)lParam);
|
---|
558 |
|
---|
559 | if (!ANIMATE_LoadRes(infoPtr, hInstance, (LPWSTR)lParam,unicode)) {
|
---|
560 | //TRACE("No AVI resource found!\n");
|
---|
561 | if (!ANIMATE_LoadFile(infoPtr, (LPWSTR)lParam,unicode)) {
|
---|
562 | //WARN("No AVI file found!\n");
|
---|
563 | return FALSE;
|
---|
564 | }
|
---|
565 | }
|
---|
566 | } else {
|
---|
567 | //TRACE("(%u);\n", (WORD)LOWORD(lParam));
|
---|
568 |
|
---|
569 | if (!ANIMATE_LoadRes(infoPtr,hInstance,unicode ? MAKEINTRESOURCEW((INT)lParam):(LPWSTR)MAKEINTRESOURCEA((INT)lParam),unicode)) {
|
---|
570 | //WARN("No AVI resource found!\n");
|
---|
571 | return FALSE;
|
---|
572 | }
|
---|
573 | }
|
---|
574 |
|
---|
575 | if (!ANIMATE_GetAviInfo(infoPtr)) {
|
---|
576 | //WARN("Can't get AVI information\n");
|
---|
577 | ANIMATE_Free(infoPtr);
|
---|
578 | return FALSE;
|
---|
579 | }
|
---|
580 |
|
---|
581 | if (!ANIMATE_GetAviCodec(infoPtr)) {
|
---|
582 | //WARN("Can't get AVI Codec\n");
|
---|
583 | ANIMATE_Free(infoPtr);
|
---|
584 | return FALSE;
|
---|
585 | }
|
---|
586 |
|
---|
587 | if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_CENTER) {
|
---|
588 | //FIXME("ACS_CENTER: NIY\n");
|
---|
589 | } else {
|
---|
590 | /* MoveWindow(hWnd, 0, 0, infoPtr->mah.dwWidth, infoPtr->mah.dwHeight, FALSE);*/
|
---|
591 | SetWindowPos(hWnd, 0, 0, 0, infoPtr->mah.dwWidth, infoPtr->mah.dwHeight,
|
---|
592 | SWP_NOACTIVATE | SWP_NOMOVE | SWP_NOZORDER);
|
---|
593 | }
|
---|
594 |
|
---|
595 | if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_TRANSPARENT) {
|
---|
596 | //FIXME("ACS_TRANSPARENT: NIY\n");
|
---|
597 | }
|
---|
598 |
|
---|
599 | if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_AUTOPLAY) {
|
---|
600 | return ANIMATE_Play(hWnd, -1, (LPARAM)MAKELONG(0, infoPtr->mah.dwTotalFrames-1));
|
---|
601 | }
|
---|
602 |
|
---|
603 | return TRUE;
|
---|
604 | }
|
---|
605 |
|
---|
606 | static LRESULT ANIMATE_Stop(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
---|
607 | {
|
---|
608 | ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(hWnd);
|
---|
609 |
|
---|
610 | /* nothing opened */
|
---|
611 | if (!infoPtr->hMMio)
|
---|
612 | return FALSE;
|
---|
613 |
|
---|
614 | ANIMATE_DoStop(infoPtr);
|
---|
615 | return TRUE;
|
---|
616 | }
|
---|
617 |
|
---|
618 |
|
---|
619 | static LRESULT ANIMATE_NCCreate(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
---|
620 | {
|
---|
621 | ANIMATE_INFO* infoPtr;
|
---|
622 |
|
---|
623 | if (!ANIMATE_LoadWINMM()) return FALSE;
|
---|
624 | if (!ANIMATE_LoadMSVFW32()) return FALSE;
|
---|
625 |
|
---|
626 | /* allocate memory for info structure */
|
---|
627 | infoPtr = (ANIMATE_INFO*)initControl(hWnd,sizeof(ANIMATE_INFO));
|
---|
628 | if (!infoPtr) {
|
---|
629 | //ERR("could not allocate info memory!\n");
|
---|
630 | return 0;
|
---|
631 | }
|
---|
632 |
|
---|
633 | /* Temporary hack until we get dllglue up and running */
|
---|
634 | *(VOID**)&infoPtr->fnICOpen = (VOID*)GetProcAddress(hMSVFW32,"ICOpen");
|
---|
635 | *(VOID**)&infoPtr->fnICClose = (VOID*)GetProcAddress(hMSVFW32,"ICClose");
|
---|
636 | *(VOID**)&infoPtr->fnICSendMessage = (VOID*)GetProcAddress(hMSVFW32,"ICSendMessage");
|
---|
637 | *(VOID**)&infoPtr->fnICDecompress = (VOID*)GetProcAddress(hMSVFW32,"ICDecompress");
|
---|
638 |
|
---|
639 | //TRACE("Animate style=0x%08lx, parent=%08lx\n", GetWindowLongA(hWnd, GWL_STYLE), (DWORD)GetParent(hWnd));
|
---|
640 |
|
---|
641 | /* store crossref hWnd <-> info structure */
|
---|
642 | infoPtr->hWnd = hWnd;
|
---|
643 |
|
---|
644 | InitializeCriticalSection(&infoPtr->cs);
|
---|
645 | //RegisterDebugptr(&infoPtr->cs, "Animate infoPtr->cs");
|
---|
646 |
|
---|
647 | return DefWindowProcA(hWnd,WM_NCCREATE,wParam,lParam);
|
---|
648 | }
|
---|
649 |
|
---|
650 | static LRESULT ANIMATE_NCHitTest(HWND hwnd,WPARAM wParam,LPARAM lParam)
|
---|
651 | {
|
---|
652 | return HTTRANSPARENT;
|
---|
653 | }
|
---|
654 |
|
---|
655 | static LRESULT ANIMATE_Timer(HWND hWnd,WPARAM wParam,LPARAM lParam)
|
---|
656 | {
|
---|
657 | return ANIMATE_DrawFrame(ANIMATE_GetInfoPtr(hWnd));
|
---|
658 | }
|
---|
659 |
|
---|
660 | static LRESULT ANIMATE_Paint(HWND hWnd,WPARAM wParam,LPARAM lParam)
|
---|
661 | {
|
---|
662 | if (wParam)
|
---|
663 | {
|
---|
664 | ANIMATE_PaintFrame(ANIMATE_GetInfoPtr(hWnd), (HDC)wParam);
|
---|
665 | } else
|
---|
666 | {
|
---|
667 | PAINTSTRUCT ps;
|
---|
668 | HDC hDC = BeginPaint(hWnd, &ps);
|
---|
669 |
|
---|
670 | ANIMATE_PaintFrame(ANIMATE_GetInfoPtr(hWnd), hDC);
|
---|
671 | EndPaint(hWnd, &ps);
|
---|
672 | }
|
---|
673 |
|
---|
674 | return 0;
|
---|
675 | }
|
---|
676 |
|
---|
677 | static LRESULT ANIMATE_Destroy(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
---|
678 | {
|
---|
679 | ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(hWnd);
|
---|
680 |
|
---|
681 |
|
---|
682 | /* free avi data */
|
---|
683 | ANIMATE_Free(infoPtr);
|
---|
684 |
|
---|
685 | /* free animate info data */
|
---|
686 | doneControl(hWnd);
|
---|
687 |
|
---|
688 | return DefWindowProcA(hWnd,WM_DESTROY,wParam,lParam);
|
---|
689 | }
|
---|
690 |
|
---|
691 |
|
---|
692 | static LRESULT ANIMATE_EraseBackground(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
---|
693 | {
|
---|
694 | RECT rect;
|
---|
695 |
|
---|
696 | GetClientRect(hWnd, &rect);
|
---|
697 | #if 0
|
---|
698 | HBRUSH hBrush = CreateSolidBrush(infoPtr->clrBk);
|
---|
699 |
|
---|
700 | FillRect((HDC)wParam, &rect, hBrush);
|
---|
701 | DeleteObject(hBrush);
|
---|
702 | #else
|
---|
703 | FillRect((HDC)wParam, &rect, GetSysColorBrush(COLOR_WINDOW));
|
---|
704 | #endif
|
---|
705 | return TRUE;
|
---|
706 | }
|
---|
707 |
|
---|
708 | static LRESULT WINAPI ANIMATE_Close(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
---|
709 | {
|
---|
710 | ANIMATE_Free(ANIMATE_GetInfoPtr(hWnd));
|
---|
711 | return TRUE;
|
---|
712 | }
|
---|
713 |
|
---|
714 | static LRESULT WINAPI ANIMATE_Size(HWND hWnd, WPARAM wParam, LPARAM lParam)
|
---|
715 | {
|
---|
716 | ANIMATE_INFO *infoPtr = ANIMATE_GetInfoPtr(hWnd);
|
---|
717 |
|
---|
718 | if (GetWindowLongA(hWnd, GWL_STYLE) & ACS_CENTER) {
|
---|
719 | //FIXME("NIY\n");
|
---|
720 | if (infoPtr->hMMio) {
|
---|
721 | /* centers the animation in the control, invalidates the control
|
---|
722 | */
|
---|
723 | }
|
---|
724 | InvalidateRect(hWnd, NULL, TRUE);
|
---|
725 | }
|
---|
726 | return DefWindowProcA(hWnd,WM_SIZE,wParam,lParam);
|
---|
727 | }
|
---|
728 |
|
---|
729 | static LRESULT ANIMATE_StyleChanged(HWND hwnd,WPARAM wParam,LPARAM lParam)
|
---|
730 | {
|
---|
731 | //CB: todo
|
---|
732 |
|
---|
733 | return 0;
|
---|
734 | }
|
---|
735 |
|
---|
736 | static LRESULT WINAPI ANIMATE_WindowProc (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
|
---|
737 | {
|
---|
738 | switch (uMsg)
|
---|
739 | {
|
---|
740 | case ACM_OPENA:
|
---|
741 | return ANIMATE_Open(hwnd,wParam,lParam,FALSE);
|
---|
742 |
|
---|
743 | case ACM_OPENW:
|
---|
744 | return ANIMATE_Open(hwnd,wParam,lParam,TRUE);
|
---|
745 |
|
---|
746 | case ACM_PLAY:
|
---|
747 | return ANIMATE_Play (hwnd, wParam, lParam);
|
---|
748 |
|
---|
749 | case ACM_STOP:
|
---|
750 | return ANIMATE_Stop (hwnd, wParam, lParam);
|
---|
751 |
|
---|
752 | case WM_CLOSE:
|
---|
753 | return ANIMATE_Close(hwnd,wParam,lParam);
|
---|
754 |
|
---|
755 | case WM_NCCREATE:
|
---|
756 | return ANIMATE_NCCreate(hwnd,wParam,lParam);
|
---|
757 |
|
---|
758 | case WM_DESTROY:
|
---|
759 | return ANIMATE_Destroy (hwnd, wParam, lParam);
|
---|
760 |
|
---|
761 | case WM_ERASEBKGND:
|
---|
762 | return ANIMATE_EraseBackground (hwnd, wParam, lParam);
|
---|
763 |
|
---|
764 | case WM_NCHITTEST:
|
---|
765 | return ANIMATE_NCHitTest(hwnd,wParam,lParam);
|
---|
766 |
|
---|
767 | case WM_PAINT:
|
---|
768 | return ANIMATE_Paint(hwnd,wParam,lParam);
|
---|
769 |
|
---|
770 | case WM_SIZE:
|
---|
771 | return ANIMATE_Size(hwnd,wParam,lParam);
|
---|
772 |
|
---|
773 | case WM_STYLECHANGED:
|
---|
774 | return ANIMATE_StyleChanged(hwnd,wParam,lParam);
|
---|
775 |
|
---|
776 | case WM_TIMER:
|
---|
777 | return ANIMATE_Timer(hwnd,wParam,lParam);
|
---|
778 |
|
---|
779 | default:
|
---|
780 | // if (uMsg >= WM_USER)
|
---|
781 | // ERR (animate, "unknown msg %04x wp=%08x lp=%08lx\n",
|
---|
782 | // uMsg, wParam, lParam);
|
---|
783 | return defComCtl32ProcA (hwnd, uMsg, wParam, lParam);
|
---|
784 | }
|
---|
785 |
|
---|
786 | return 0;
|
---|
787 | }
|
---|
788 |
|
---|
789 |
|
---|
790 | VOID
|
---|
791 | ANIMATE_Register (VOID)
|
---|
792 | {
|
---|
793 | WNDCLASSA wndClass;
|
---|
794 |
|
---|
795 | ZeroMemory (&wndClass, sizeof(WNDCLASSA));
|
---|
796 | wndClass.style = CS_GLOBALCLASS | CS_DBLCLKS;
|
---|
797 | wndClass.lpfnWndProc = (WNDPROC)ANIMATE_WindowProc;
|
---|
798 | wndClass.cbClsExtra = 0;
|
---|
799 | wndClass.cbWndExtra = sizeof(ANIMATE_INFO *);
|
---|
800 | wndClass.hCursor = LoadCursorA (0, IDC_ARROWA);
|
---|
801 | wndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
|
---|
802 | wndClass.lpszClassName = ANIMATE_CLASSA;
|
---|
803 |
|
---|
804 | RegisterClassA (&wndClass);
|
---|
805 | }
|
---|
806 |
|
---|
807 |
|
---|
808 | VOID
|
---|
809 | ANIMATE_Unregister (VOID)
|
---|
810 | {
|
---|
811 | UnregisterClassA (ANIMATE_CLASSA, (HINSTANCE)NULL);
|
---|
812 | }
|
---|
813 |
|
---|