ReactOS  0.4.14-dev-593-g1793dcc
mplay32.c
Go to the documentation of this file.
1 /*
2  * PROJECT: ReactOS Multimedia Player
3  * FILE: base/applications/mplay32/mplay32.c
4  * PROGRAMMERS: Dmitry Chapyshev (dmitry@reactos.org)
5  */
6 
7 #include "mplay32.h"
8 
9 #define IDT_PLAYTIMER 1000
10 
11 #define MAIN_WINDOW_HEIGHT 125
12 #define MAIN_WINDOW_MIN_WIDTH 250
13 #define MAX_MCISTR 256
14 
15 #ifdef UNICODE
16 #define argv __wargv
17 #else
18 #define argv __argv
19 #endif
20 
26 
27 TCHAR szAppTitle[256] = _T("");
31 
37 
39 
40 /* ToolBar Buttons */
41 static const TBBUTTON Buttons[] =
42 { /* iBitmap, idCommand, fsState, fsStyle, bReserved[2], dwData, iString */
46  {15, 0, TBSTATE_ENABLED, BTNS_SEP, {0}, 0, 0},
51 // {TBICON_PAUSE, IDC_PAUSE, TBSTATE_ENABLED, BTNS_BUTTON, {0}, 0, 0}
52 };
53 
55 {
56  MCIERROR mciError;
57  MCI_GENERIC_PARMS mciGeneric;
58  MCI_DGV_RECT_PARMS mciVideoRect;
59  MCI_DGV_WINDOW_PARMSW mciVideoWindow;
60 
62 
63  mciError = mciSendCommand(wDeviceId, MCI_CONFIGURE, MCI_TEST, (DWORD_PTR)&mciGeneric);
64  if (mciError == 0)
65  {
67  }
68 
69  mciVideoWindow.hWnd = hwnd;
70 
71  mciError = mciSendCommand(wDeviceId, MCI_WINDOW, MCI_DGV_WINDOW_HWND | MCI_TEST, (DWORD_PTR)&mciVideoWindow);
72  if (!mciError)
73  {
75  if (!mciError)
76  {
78  }
79  }
80 }
81 
82 void DisableMenuItems(void)
83 {
87 }
88 
89 void ResizeClientArea(HWND hwnd, int nWidth, int nHeight)
90 {
91  RECT rcClientRect;
92  RECT rcWindowRect;
93  POINT ptDifference;
94 
95  GetClientRect(hwnd, &rcClientRect);
96  GetWindowRect(hwnd, &rcWindowRect);
97  ptDifference.x = (rcWindowRect.right - rcWindowRect.left) - rcClientRect.right;
98  ptDifference.y = (rcWindowRect.bottom - rcWindowRect.top) - rcClientRect.bottom;
99  MoveWindow(hwnd, rcWindowRect.left, rcWindowRect.top, nWidth + ptDifference.x, nHeight + ptDifference.y, TRUE);
100 }
101 
103 {
104  TCHAR szNewTitle[MAX_PATH + 3 + 256];
105  TCHAR szStatus[128];
106 
107  if (wDeviceId == 0)
108  {
110  return;
111  }
112 
113  switch (GetDeviceMode(hwnd))
114  {
115  case MCI_MODE_PAUSE:
116  {
118  break;
119  }
120 
121  case MCI_MODE_STOP:
122  {
124  break;
125  }
126 
127  case MCI_MODE_PLAY:
128  {
130  break;
131  }
132 
133  case MCI_MODE_OPEN:
134  {
136  break;
137  }
138 
139  case MCI_MODE_RECORD:
140  {
142  break;
143  }
144 
145  case MCI_MODE_SEEK:
146  {
148  break;
149  }
150 
151  case MCI_MODE_NOT_READY:
152  {
154  break;
155  }
156 
157  default:
158  {
160  }
161  }
162 
163  StringCbPrintf(szNewTitle, sizeof(szNewTitle), _T("%s - %s (%s)"), szAppTitle, szCurrentFile, szStatus);
164  SetWindowText(hwnd, szNewTitle);
165 }
166 
168 {
169  MCI_STATUS_PARMS mciStatus;
171  DWORD dwTimeFormat;
172 
173  if (!wDeviceId)
174  {
175  SetWindowText(hwnd, _T(""));
176  return;
177  }
178 
179  mciStatus.dwItem = MCI_STATUS_TIME_FORMAT;
180  mciStatus.dwReturn = 0;
182  dwTimeFormat = mciStatus.dwReturn;
183 
184  mciStatus.dwItem = MCI_STATUS_POSITION;
185  mciStatus.dwReturn = 0;
187 
188  switch(dwTimeFormat)
189  {
191  {
192  int s, m, h;
193 
194  s = (mciStatus.dwReturn / 1000) % 60;
195  m = ((mciStatus.dwReturn / (1000*60)) % 60);
196  h = ((mciStatus.dwReturn / (1000*60*60)) % 24);
197  StringCbPrintf(szTime, sizeof(szTime), _T("%02lu:%02lu:%02lu"), h, m, s);
198  break;
199  }
200 
201  /* The time format is unknown, so use the returned position as is */
202  default:
203  {
204  StringCbPrintf(szTime, sizeof(szTime), _T("%lu"), mciStatus.dwReturn);
205  break;
206  }
207  }
208 
210 }
211 
212 static VOID
214 {
215  LPTSTR lpMessageBuffer;
216  DWORD dwError = GetLastError();
217 
218  if (dwError == ERROR_SUCCESS)
219  return;
220 
224  NULL,
225  dwError,
227  (LPTSTR)&lpMessageBuffer,
228  0, NULL))
229  {
230  return;
231  }
232 
233  MessageBox(hwnd, lpMessageBuffer, szAppTitle, MB_OK | MB_ICONERROR);
234  LocalFree(lpMessageBuffer);
235 }
236 
237 static VOID
239 {
240  HIMAGELIST hImageList;
241 
242  hImageList = ImageList_Create(16, 16, ILC_MASK | ILC_COLOR24, 1, 1);
243  if (!hImageList)
244  {
246  return;
247  }
248 
249  ImageList_AddMasked(hImageList,
251  RGB(255, 255, 255));
252 
253  ImageList_AddMasked(hImageList,
255  RGB(255, 255, 255));
256 
257  ImageList_AddMasked(hImageList,
259  RGB(255, 255, 255));
260 
261  ImageList_AddMasked(hImageList,
263  RGB(255, 255, 255));
264 
265  ImageList_AddMasked(hImageList,
267  RGB(255, 255, 255));
268 
269  ImageList_AddMasked(hImageList,
271  RGB(255, 255, 255));
272 
273  ImageList_AddMasked(hImageList,
275  RGB(255, 255, 255));
276 
277  ImageList_AddMasked(hImageList,
279  RGB(255, 255, 255));
280 
283  0,
284  (LPARAM)hImageList));
285 }
286 
287 static VOID
289 {
290  TCHAR szErrorMessage[MAX_MCISTR];
291  TCHAR szTempMessage[MAX_MCISTR + 44];
292 
293  if (mciGetErrorString(mciError, szErrorMessage, ARRAYSIZE(szErrorMessage)) == FALSE)
294  {
295  LoadString(hInstance, IDS_DEFAULTMCIERRMSG, szErrorMessage, ARRAYSIZE(szErrorMessage));
296  }
297 
298  StringCbPrintf(szTempMessage, sizeof(szTempMessage), _T("MMSYS%lu: %s"), mciError, szErrorMessage);
299  MessageBox(hwnd, szTempMessage, szAppTitle, MB_OK | MB_ICONEXCLAMATION);
300 }
301 
302 static VOID
304 {
305  INT NumButtons = ARRAYSIZE(Buttons);
306 
308 
309  /* Create trackbar */
312  NULL,
314  0,
315  0,
316  340,
317  20,
318  hwnd,
319  NULL,
320  hInstance,
321  NULL);
322  if (!hTrackBar)
323  {
325  return;
326  }
327 
328  /* Create toolbar */
331  NULL,
334  0,
335  40,
336  340,
337  30,
338  hwnd,
339  NULL,
340  hInstance,
341  NULL);
342  if (!hToolBar)
343  {
345  return;
346  }
347 
349  L"STATIC",
350  NULL,
352  195,
353  4,
354  135,
355  18,
356  hToolBar,
357  NULL,
358  hInstance,
359  NULL);
360  if (!hTimeDisplay)
361  {
363  return;
364  }
365 
368 }
369 
370 static VOID
372 {
373  MCIERROR mciError;
374  MCI_DGV_RECT_PARMS mciVideoRect;
375  MCI_DGV_WINDOW_PARMSW mciVideoWindow;
376  RECT rcToolbarRect;
377  RECT rcTempRect;
378 
379  mciVideoWindow.hWnd = hwnd;
380 
381  mciError = mciSendCommand(wDeviceId, MCI_WINDOW, MCI_DGV_WINDOW_HWND | MCI_TEST, (DWORD_PTR)&mciVideoWindow);
382  if (mciError != 0)
383  return;
384 
386  if (mciError != 0)
387  return;
388 
389  if (!bIsSingleWindow)
390  {
392 
394 
395  mciError = mciSendCommand(wDeviceId, MCI_WHERE, MCI_DGV_WHERE_SOURCE, (DWORD_PTR)&mciVideoRect);
396  if (mciError != 0)
397  {
398  ShowMCIError(hwnd, mciError);
399  return;
400  }
401 
402  GetWindowRect(hToolBar, &rcToolbarRect);
403  ResizeClientArea(hwnd, mciVideoRect.rc.right, mciVideoRect.rc.bottom + (rcToolbarRect.bottom - rcToolbarRect.top));
404 
405  mciError = mciSendCommand(wDeviceId, MCI_WINDOW, MCI_DGV_WINDOW_HWND, (DWORD_PTR)&mciVideoWindow);
406  if (mciError != 0)
407  {
408  ShowMCIError(hwnd, mciError);
409  return;
410  }
411 
412  GetWindowRect(hToolBar, &rcTempRect);
413  MoveWindow(hTrackBar, 180, 0, rcTempRect.right - rcTempRect.left - 322, 25, TRUE);
414  MoveWindow(hTimeDisplay, rcTempRect.right - rcTempRect.left - 140, 4, 135, 18, TRUE);
415 
418  }
419  else
420  {
423 
424  mciVideoWindow.hWnd = MCI_DGV_WINDOW_DEFAULT;
425  mciError = mciSendCommand(wDeviceId, MCI_WINDOW, MCI_DGV_WINDOW_HWND, (DWORD_PTR)&mciVideoWindow);
426  if (mciError != 0)
427  {
428  ShowMCIError(hwnd, mciError);
429  return;
430  }
431 
433 
435  }
436 }
437 
438 static DWORD
440 {
441  MCI_SYSINFO_PARMS mciSysInfo;
442  DWORD dwNumDevices = 0;
443 
444  mciSysInfo.dwCallback = 0;
445  mciSysInfo.lpstrReturn = (LPTSTR)&dwNumDevices;
446  mciSysInfo.dwRetSize = sizeof(dwNumDevices);
447  mciSysInfo.dwNumber = 0;
448  mciSysInfo.wDeviceType = MCI_ALL_DEVICE_ID;
449 
451 
452  return *(DWORD*)mciSysInfo.lpstrReturn;
453 }
454 
455 static DWORD
456 GetDeviceName(DWORD dwDeviceIndex, LPTSTR lpDeviceName, DWORD dwDeviceNameSize)
457 {
458  MCI_SYSINFO_PARMS mciSysInfo;
459 
460  mciSysInfo.dwCallback = 0;
461  mciSysInfo.lpstrReturn = lpDeviceName;
462  mciSysInfo.dwRetSize = dwDeviceNameSize;
463  mciSysInfo.dwNumber = dwDeviceIndex;
465 
467 }
468 
469 static DWORD
470 GetDeviceFriendlyName(LPTSTR lpDeviceName, LPTSTR lpFriendlyName, DWORD dwFriendlyNameSize)
471 {
472  MCIERROR mciError;
473  MCI_OPEN_PARMS mciOpen;
474  MCI_INFO_PARMS mciInfo;
475  MCI_GENERIC_PARMS mciGeneric;
476 
477  mciOpen.dwCallback = 0;
478  mciOpen.wDeviceID = 0;
479  mciOpen.lpstrDeviceType = lpDeviceName;
480  mciOpen.lpstrElementName = NULL;
481  mciOpen.lpstrAlias = NULL;
482 
483  mciError = mciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE | MCI_WAIT, (DWORD_PTR)&mciOpen);
484  if (mciError != 0)
485  return mciError;
486 
487  mciInfo.dwCallback = 0;
488  mciInfo.lpstrReturn = lpFriendlyName;
489  mciInfo.dwRetSize = dwFriendlyNameSize;
490 
491  mciError = mciSendCommand(mciOpen.wDeviceID, MCI_INFO, MCI_INFO_PRODUCT, (DWORD_PTR)&mciInfo);
492 
493  mciGeneric.dwCallback = 0;
494  mciSendCommand(mciOpen.wDeviceID, MCI_CLOSE, MCI_WAIT, (DWORD_PTR)&mciGeneric);
495 
496  return mciError;
497 }
498 
499 static BOOL
500 DeviceUsesFiles(LPTSTR lpDeviceName)
501 {
502  MCIERROR mciError;
503  MCI_OPEN_PARMS mciOpen;
504  MCI_GETDEVCAPS_PARMS mciDevCaps;
505  MCI_GENERIC_PARMS mciGeneric;
506 
507  mciOpen.dwCallback = 0;
508  mciOpen.wDeviceID = 0;
509  mciOpen.lpstrDeviceType = lpDeviceName;
510  mciOpen.lpstrElementName = NULL;
511  mciOpen.lpstrAlias = NULL;
512 
513  mciError = mciSendCommand(0, MCI_OPEN, MCI_OPEN_TYPE | MCI_WAIT, (DWORD_PTR)&mciOpen);
514  if (mciError != 0)
515  return FALSE;
516 
517  mciDevCaps.dwCallback = 0;
518  mciDevCaps.dwReturn = 0;
519  mciDevCaps.dwItem = MCI_GETDEVCAPS_USES_FILES;
520 
521  mciError = mciSendCommand(mciOpen.wDeviceID, MCI_GETDEVCAPS, MCI_WAIT | MCI_GETDEVCAPS_ITEM, (DWORD_PTR)&mciDevCaps);
522  if (mciError != 0)
523  return FALSE;
524 
525  mciGeneric.dwCallback = 0;
526  mciSendCommand(mciOpen.wDeviceID, MCI_CLOSE, MCI_WAIT, (DWORD_PTR)&mciGeneric);
527 
528  return (BOOL)mciDevCaps.dwReturn;
529 }
530 
531 static MCIERROR
533 {
534  MCIERROR mciError;
535  MCI_GENERIC_PARMS mciGeneric;
536 
537  if (wDeviceId)
538  {
539  mciError = mciSendCommand(wDeviceId, MCI_CLOSE, MCI_WAIT, (DWORD_PTR)&mciGeneric);
540  if (mciError != 0) return mciError;
541  wDeviceId = 0;
542  }
543 
545 
547 
548  return 0;
549 }
550 
551 static MCIERROR
553 {
554  MCIERROR mciError;
555  MCI_STATUS_PARMS mciStatus;
556  MCI_OPEN_PARMS mciOpen;
558  LPTSTR lpStr;
559 
560  if (wDeviceId)
561  CloseMciDevice();
562 
563  mciOpen.lpstrDeviceType = lpType;
564  mciOpen.lpstrElementName = lpFileName;
565  mciOpen.dwCallback = 0;
566  mciOpen.wDeviceID = 0;
567  mciOpen.lpstrAlias = NULL;
568 
569  if (lpType)
571 
572  if (lpFileName)
574 
575  mciError = mciSendCommand(0, MCI_OPEN, dwFlags, (DWORD_PTR)&mciOpen);
576  if (mciError != 0)
577  return mciError;
578 
579  mciStatus.dwItem = MCI_STATUS_LENGTH;
580 
581  mciError = mciSendCommand(mciOpen.wDeviceID, MCI_STATUS, MCI_STATUS_ITEM | MCI_WAIT, (DWORD_PTR)&mciStatus);
582  if (mciError != 0)
583  return mciError;
584 
586  SendMessage(hTrackBar, TBM_SETRANGEMAX, (WPARAM)TRUE, (LPARAM)mciStatus.dwReturn);
590 
591  if (mciStatus.dwReturn < 10000)
592  {
594  }
595  else if (mciStatus.dwReturn < 100000)
596  {
598  }
599  else if (mciStatus.dwReturn < 1000000)
600  {
602  }
603  else
604  {
606  }
607 
608  MaxFilePos = mciStatus.dwReturn;
609  wDeviceId = mciOpen.wDeviceID;
610 
611  /* NOTE: Everything above this line may be done instead in OpenMediaFile() */
612 
613  if (lpFileName)
614  {
615  lpStr = _tcsrchr(lpFileName, _T('\\'));
616  if (lpStr) // Get only the file name (skip the last path separator)
617  lpStr++;
618  else
619  lpStr = lpFileName;
620  }
621  else
622  lpStr = lpType;
623 
624  StringCbCopy(szCurrentFile, sizeof(szCurrentFile), lpStr);
625 
627 
630 
631  return 0;
632 }
633 
634 static DWORD
636 {
637  MCIERROR mciError;
638  MCI_STATUS_PARMS mciStatus;
639 
640  mciStatus.dwItem = MCI_STATUS_MODE;
642  if (mciError != 0)
643  {
644  ShowMCIError(hwnd, mciError);
645  return MCI_MODE_NOT_READY;
646  }
647 
648  return mciStatus.dwReturn;
649 }
650 
651 static VOID
653 {
654  MCIERROR mciError;
655  MCI_GENERIC_PARMS mciGeneric;
656  MCI_SEEK_PARMS mciSeek;
657 
658  if (wDeviceId == 0) return;
659 
662 
663  mciGeneric.dwCallback = (DWORD_PTR)hwnd;
664  mciError = mciSendCommand(wDeviceId, MCI_STOP, MCI_WAIT, (DWORD_PTR)&mciGeneric);
665  if (mciError != 0)
666  {
667  ShowMCIError(hwnd, mciError);
668  return;
669  }
670 
672 
675 
677  TB_SETCMDID,
678  0,
679  IDC_PLAY);
682  IDC_PLAY,
684 }
685 
686 static VOID
688 {
689  MCIERROR mciError;
690  MCI_SEEK_PARMS mciSeek;
691  MCI_PLAY_PARMS mciPlay;
692 
693  if (wDeviceId == 0) return;
694 
695  mciSeek.dwTo = (DWORD_PTR)dwNewPos;
696  mciError = mciSendCommand(wDeviceId, MCI_SEEK, MCI_WAIT | MCI_TO, (DWORD_PTR)&mciSeek);
697  if (mciError != 0)
698  {
699  ShowMCIError(hwnd, mciError);
700  }
701 
702  mciPlay.dwCallback = (DWORD_PTR)hwnd;
703  mciError = mciSendCommand(wDeviceId, MCI_PLAY, MCI_NOTIFY, (DWORD_PTR)&mciPlay);
704  if (mciError != 0)
705  {
706  ShowMCIError(hwnd, mciError);
707  }
708 }
709 
710 static VOID
712 {
713  MCI_STATUS_PARMS mciStatus;
714  DWORD dwNewPos;
715 
716  if (wDeviceId == 0) return;
717 
718  mciStatus.dwItem = MCI_STATUS_POSITION;
720 
721  dwNewPos = mciStatus.dwReturn - 1;
722 
723  if ((UINT)dwNewPos <= 1)
724  {
726  }
727  else
728  {
729  SeekPlayback(hwnd, dwNewPos);
730  }
731 }
732 
733 static VOID
735 {
736  MCI_STATUS_PARMS mciStatus;
737  DWORD dwNewPos;
738 
739  if (wDeviceId == 0) return;
740 
741  mciStatus.dwItem = MCI_STATUS_POSITION;
743 
744  dwNewPos = mciStatus.dwReturn + 1;
745 
746  if ((UINT)dwNewPos >= MaxFilePos)
747  {
749  }
750  else
751  {
752  SeekPlayback(hwnd, dwNewPos);
753  }
754 }
755 
758 {
759  MCI_STATUS_PARMS mciStatus;
760  DWORD dwPos;
761 
763 
764  mciStatus.dwItem = MCI_STATUS_POSITION;
766  dwPos = mciStatus.dwReturn;
767 
770 }
771 
772 static VOID
774 {
775  MCIERROR mciError;
776  MCI_PLAY_PARMS mciPlay;
777  MCI_SEEK_PARMS mciSeek;
778 
780 
782 
783  mciPlay.dwCallback = (DWORD_PTR)hwnd;
784  mciPlay.dwFrom = 0;
785  mciPlay.dwTo = MaxFilePos;
786 
787  mciError = mciSendCommand(wDeviceId, MCI_PLAY, MCI_NOTIFY | MCI_FROM /*| MCI_TO*/, (DWORD_PTR)&mciPlay);
788  if (mciError != 0)
789  {
790  ShowMCIError(hwnd, mciError);
791  return;
792  }
793 
795 
797  TB_SETCMDID,
798  0,
799  IDC_PAUSE);
802  IDC_PAUSE,
804 }
805 
806 static VOID
808 {
809  MCIERROR mciError;
810  MCI_GENERIC_PARMS mciGeneric;
811  ULONG idBmp = IDB_PLAYICON;
812  ULONG idCmd = IDC_PLAY;
813 
814  if (wDeviceId == 0) return;
815 
816  switch (GetDeviceMode(hwnd))
817  {
818  case MCI_MODE_OPEN:
819  case MCI_MODE_STOP:
820  {
822  return;
823  }
824 
825  case MCI_MODE_PLAY:
826  {
827  mciGeneric.dwCallback = (DWORD_PTR)hwnd;
828  mciError = mciSendCommand(wDeviceId, MCI_PAUSE, MCI_WAIT, (DWORD_PTR)&mciGeneric);
829  idBmp = IDB_PLAYICON;
830  idCmd = IDC_PLAY;
831  break;
832  }
833 
834  case MCI_MODE_PAUSE:
835  {
836  mciGeneric.dwCallback = (DWORD_PTR)hwnd;
837  mciError = mciSendCommand(wDeviceId, MCI_RESUME, MCI_WAIT, (DWORD_PTR)&mciGeneric);
838  idBmp = IDB_PAUSEICON;
839  idCmd = IDC_PAUSE;
840  break;
841  }
842 
843  default:
844  {
845  return;
846  }
847  }
848 
849  if (mciError != 0)
850  {
851  ShowMCIError(hwnd, mciError);
852  return;
853  }
854 
856 
858  TB_SETCMDID,
859  0,
860  idCmd);
863  idCmd,
864  idBmp - IDB_PLAYICON);
865 }
866 
867 static VOID
869 {
870  MCIERROR mciError;
871  MCI_GENERIC_PARMS mciGeneric;
872 
873  mciError = mciSendCommand(wDeviceId, MCI_CONFIGURE, MCI_WAIT, (DWORD_PTR)&mciGeneric);
874  if (mciError != 0)
875  {
876  ShowMCIError(hwnd, mciError);
877  }
878 }
879 
880 static VOID
882 {
884 
885  if (bIsSingleWindow)
887 
888  CloseMciDevice();
890 }
891 
892 static VOID
894 {
895  MCIERROR mciError;
896 
898  return;
899 
900  if (wDeviceId)
902 
903  mciError = OpenMciDevice(hwnd, lpType, lpFileName);
904  if (mciError != 0)
905  {
906  ShowMCIError(hwnd, mciError);
907  return;
908  }
909 
911 }
912 
913 static DWORD
914 InsertDeviceMenuItem(HMENU hMenu, UINT uItem, BOOL fByPosition, UINT uItemID, DWORD dwDeviceIndex)
915 {
916  MENUITEMINFO lpmii;
917  MCIERROR mciError;
919  TCHAR szFriendlyName[MAX_MCISTR];
920 
921  mciError = GetDeviceName(dwDeviceIndex, szDeviceName, sizeof(szDeviceName));
922  if (mciError)
923  {
924  return mciError;
925  }
926 
927  mciError = GetDeviceFriendlyName(szDeviceName, szFriendlyName, sizeof(szFriendlyName));
928  if (mciError)
929  {
930  return mciError;
931  }
932 
934  {
935  StringCbCat(szFriendlyName, sizeof(szFriendlyName), _T("..."));
936  }
937 
938  ZeroMemory(&lpmii, sizeof(MENUITEMINFO));
939  lpmii.cbSize = sizeof(lpmii);
940  lpmii.fMask = MIIM_DATA | MIIM_TYPE | MIIM_ID;
941  lpmii.wID = uItemID;
942  lpmii.fType = MF_STRING;
943  lpmii.dwTypeData = szFriendlyName;
944  lpmii.dwItemData = dwDeviceIndex;
945  InsertMenuItem(hMenu, uItem, fByPosition, &lpmii);
946 
947  return 0;
948 }
949 
950 static VOID
952 {
954  TCHAR szFriendlyName[MAX_MCISTR];
955  TCHAR *szDevice = NULL;
956  static TCHAR szDefaultExtension[] = _T("*.*");
957  TCHAR *szExtensionList = NULL;
958  TCHAR *szExtension = NULL;
959  TCHAR *c = NULL;
960  TCHAR *d = NULL;
961  DWORD dwNumValues;
962  DWORD dwNumDevices;
963  DWORD dwValueNameLen;
964  DWORD dwValueDataSize;
965  DWORD dwMaskLen;
966  DWORD dwFilterSize;
967  DWORD dwDeviceSize;
968  DWORD dwExtensionLen;
969  DWORD dwPosition = 0;
970  DWORD i;
971  DWORD j;
972  size_t uSizeRemain;
973  size_t uMaskRemain;
974  HKEY hKey = NULL;
975 
976  /* Always load the default (all files) filter */
978 
979  if (RegOpenKeyEx(HKEY_LOCAL_MACHINE, _T("SOFTWARE\\Microsoft\\Windows NT\\CurrentVersion\\MCI Extensions"), 0, KEY_READ, &hKey) != ERROR_SUCCESS)
980  {
981  goto Failure;
982  }
983 
984  if (RegQueryInfoKey(hKey, NULL, NULL, NULL, NULL, NULL, NULL, &dwNumValues, &dwValueNameLen, &dwValueDataSize, NULL, NULL) != ERROR_SUCCESS)
985  {
986  goto Failure;
987  }
988 
989  dwMaskLen = ((dwValueNameLen + 3) * dwNumValues) + 1;
990 
991  szExtensionList = malloc(dwMaskLen * sizeof(TCHAR));
992  if (!szExtensionList)
993  goto Failure;
994 
995  dwNumDevices = GetNumDevices();
996 
997  /* Allocate space for every pair of Device and Extension Filter */
998  dwFilterSize = (MAX_MCISTR + (dwMaskLen * 2) + 5) * dwNumDevices;
999 
1000  /* Add space for the "All supported" entry */
1001  dwFilterSize = (dwFilterSize + (dwMaskLen * 2) + 7) * sizeof(TCHAR) + sizeof(szDefaultFilter);
1002 
1003  szFilter = malloc(dwFilterSize);
1004  if (!szFilter)
1005  goto Failure;
1006 
1007  szExtension = malloc((dwValueNameLen + 1) * sizeof(TCHAR));
1008  if (!szExtension)
1009  goto Failure;
1010 
1011  szDevice = malloc(dwValueDataSize + sizeof(TCHAR));
1012  if (!szDevice)
1013  goto Failure;
1014 
1015  ZeroMemory(szFilter, dwFilterSize);
1016 
1017  uSizeRemain = dwFilterSize;
1018  c = szFilter;
1019 
1020  for (j = 1; j <= dwNumDevices; j++)
1021  {
1022  if (GetDeviceName(j, szDeviceName, sizeof(szDeviceName)))
1023  {
1024  continue;
1025  }
1026 
1027  if (GetDeviceFriendlyName(szDeviceName, szFriendlyName, sizeof(szFriendlyName)))
1028  {
1029  continue;
1030  }
1031 
1032  /* Insert a menu item under the "Device" menu for every found MCI device */
1033  InsertDeviceMenuItem(GetSubMenu(hMainMenu, 3), dwPosition, TRUE, IDM_DEVICE_FIRST + dwPosition, j);
1034  dwPosition++;
1035 
1036  /* Copy the default extension list, that may be overwritten after... */
1037  StringCbCopy(szExtensionList, dwMaskLen * sizeof(TCHAR), szDefaultExtension);
1038 
1039  /* Try to determine the real extension list */
1040  uMaskRemain = dwMaskLen * sizeof(TCHAR);
1041  d = szExtensionList;
1042 
1043  for (i = 0; i < dwNumValues; i++)
1044  {
1045  dwExtensionLen = dwValueNameLen + 1;
1046  dwDeviceSize = dwValueDataSize + sizeof(TCHAR);
1047 
1048  ZeroMemory(szDevice, dwDeviceSize);
1049 
1050  if (RegEnumValue(hKey, i, szExtension, &dwExtensionLen, NULL, NULL, (LPBYTE)szDevice, &dwDeviceSize) == ERROR_SUCCESS)
1051  {
1052  CharLowerBuff(szDevice, dwDeviceSize / sizeof(TCHAR));
1054  if (_tcscmp(szDeviceName, szDevice) == 0)
1055  {
1056  CharLowerBuff(szExtension, dwExtensionLen);
1057  StringCbPrintfEx(d, uMaskRemain, &d, &uMaskRemain, 0, _T("%s%s%s"), _T("*."), szExtension, _T(";"));
1058  }
1059  }
1060  }
1061 
1062  /* Remove the last separator */
1063  d--;
1064  uSizeRemain += sizeof(*d);
1065  *d = _T('\0');
1066 
1067  /* Add the description */
1068  StringCbPrintfEx(c, uSizeRemain, &c, &uSizeRemain, 0, _T("%s (%s)"), szFriendlyName, szExtensionList);
1069 
1070  /* Skip one char to separate the description from the filter mask */
1071  c++;
1072  uSizeRemain -= sizeof(*c);
1073 
1074  /* Append the filter mask */
1075  StringCbCopyEx(c, uSizeRemain, szExtensionList, &c, &uSizeRemain, 0);
1076 
1077  /* Skip another char to separate the elements of the filter mask */
1078  c++;
1079  uSizeRemain -= sizeof(*c);
1080  }
1081 
1082  /* Build the full list of supported extensions */
1083  uMaskRemain = dwMaskLen * sizeof(TCHAR);
1084  d = szExtensionList;
1085 
1086  for (i = 0; i < dwNumValues; i++)
1087  {
1088  dwExtensionLen = dwValueNameLen + 1;
1089 
1090  if (RegEnumValue(hKey, i, szExtension, &dwExtensionLen, NULL, NULL, NULL, NULL) == ERROR_SUCCESS)
1091  {
1092  CharLowerBuff(szExtension, dwExtensionLen);
1093  StringCbPrintfEx(d, uMaskRemain, &d, &uMaskRemain, 0, _T("%s%s%s"), _T("*."), szExtension, _T(";"));
1094  }
1095  }
1096 
1097  /* Remove the last separator */
1098  d--;
1099  uSizeRemain += sizeof(*d);
1100  *d = _T('\0');
1101 
1102  /* Add the default (all files) description */
1103  StringCbPrintfEx(c, uSizeRemain, &c, &uSizeRemain, 0, _T("%s (%s)"), szDefaultFilter, szExtensionList);
1104 
1105  /* Skip one char to separate the description from the filter mask */
1106  c++;
1107  uSizeRemain -= sizeof(*c);
1108 
1109  /* Append the filter mask */
1110  StringCbCopyEx(c, uSizeRemain, szExtensionList, &c, &uSizeRemain, 0);
1111 
1112 Cleanup:
1113  if (szExtensionList) free(szExtensionList);
1114  if (szExtension) free(szExtension);
1115  if (szDevice) free(szDevice);
1116  RegCloseKey(hKey);
1117 
1118  return;
1119 
1120 Failure:
1121  /* We failed at retrieving the supported files, so use the default filter */
1122  if (szFilter) free(szFilter);
1124 
1125  uSizeRemain = sizeof(szDefaultFilter);
1126  c = szFilter;
1127 
1128  /* Add the default (all files) description */
1129  StringCbPrintfEx(c, uSizeRemain, &c, &uSizeRemain, 0, _T("%s (%s)"), szDefaultFilter, szDefaultExtension);
1130 
1131  /* Skip one char to separate the description from the filter mask */
1132  c++;
1133  uSizeRemain -= sizeof(*c);
1134 
1135  /* Append the filter mask */
1136  StringCbCopyEx(c, uSizeRemain, szDefaultExtension, &c, &uSizeRemain, 0);
1137 
1138  goto Cleanup;
1139 }
1140 
1141 static VOID
1143 {
1145 }
1146 
1147 static VOID
1148 OpenFileDialog(HWND hwnd, DWORD dwFilterIndex, LPTSTR lpType)
1149 {
1150  OPENFILENAME OpenFileName;
1151  TCHAR szFile[MAX_PATH + 1] = _T("");
1152  TCHAR szCurrentDir[MAX_PATH];
1153 
1154  ZeroMemory(&OpenFileName, sizeof(OpenFileName));
1155 
1156  if (!GetCurrentDirectory(ARRAYSIZE(szCurrentDir), szCurrentDir))
1157  {
1158  StringCbCopy(szCurrentDir, sizeof(szCurrentDir), _T("c:\\"));
1159  }
1160 
1161  OpenFileName.lStructSize = sizeof(OpenFileName);
1162  OpenFileName.hwndOwner = hwnd;
1163  OpenFileName.hInstance = hInstance;
1164  OpenFileName.lpstrFilter = szFilter;
1165  OpenFileName.lpstrFile = szFile;
1166  OpenFileName.nMaxFile = ARRAYSIZE(szFile);
1167  OpenFileName.lpstrInitialDir = szCurrentDir;
1169  OpenFileName.lpstrDefExt = _T("\0");
1170  OpenFileName.nFilterIndex = dwFilterIndex;
1171 
1172  if (!GetOpenFileName(&OpenFileName))
1173  return;
1174 
1175  OpenMediaFile(hwnd, OpenFileName.lpstrFile, lpType);
1176 }
1177 
1178 static VOID
1180 {
1181  MENUITEMINFO lpmii;
1183  MCIERROR mciError;
1184 
1185  ZeroMemory(&lpmii, sizeof(MENUITEMINFO));
1186  lpmii.cbSize = sizeof(lpmii);
1187  lpmii.fMask = MIIM_DATA;
1188  GetMenuItemInfo(hMainMenu, uItem, FALSE, &lpmii);
1189 
1190  mciError = GetDeviceName(lpmii.dwItemData, szDeviceName, sizeof(szDeviceName));
1191  if (mciError)
1192  {
1193  ShowMCIError(hwnd, mciError);
1194  return;
1195  }
1196 
1198  {
1200  return;
1201  }
1202 
1203  mciError = OpenMciDevice(hwnd, szDeviceName, NULL);
1204  if (mciError)
1205  {
1206  ShowMCIError(hwnd, mciError);
1207  }
1208 
1209  return;
1210 }
1211 
1214 {
1215  switch (Message)
1216  {
1217  case WM_CREATE:
1218  {
1219  InitControls(hwnd);
1220  hMainMenu = GetMenu(hwnd);
1221  break;
1222  }
1223 
1224  case WM_DROPFILES:
1225  {
1226  HDROP drophandle;
1227  TCHAR droppedfile[MAX_PATH];
1228 
1229  drophandle = (HDROP)wParam;
1230  DragQueryFile(drophandle, 0, droppedfile, ARRAYSIZE(droppedfile));
1231  DragFinish(drophandle);
1232  OpenMediaFile(hwnd, droppedfile, NULL);
1233  break;
1234  }
1235 
1236  case MM_MCINOTIFY:
1237  {
1239  {
1240  StopPlayback(hwnd);
1241  if (bRepeat)
1242  {
1244  }
1245  }
1246  break;
1247  }
1248 
1249  case WM_NOTIFY:
1250  {
1251  LPNMHDR pnmhdr = (LPNMHDR)lParam;
1252 
1253  switch (pnmhdr->code)
1254  {
1255  case TTN_GETDISPINFO:
1256  {
1258  UINT idButton = (UINT)lpttt->hdr.idFrom;
1259 
1260  switch (idButton)
1261  {
1262  case IDC_PLAY:
1263  lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_PLAY);
1264  break;
1265  case IDC_STOP:
1266  lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_STOP);
1267  break;
1268  case IDC_EJECT:
1269  lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_EJECT);
1270  break;
1271  case IDC_BACKWARD:
1272  lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_BACKWARD);
1273  break;
1274  case IDC_SEEKBACK:
1275  lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_SEEKBACK);
1276  break;
1277  case IDC_SEEKFORW:
1278  lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_SEEKFORW);
1279  break;
1280  case IDC_FORWARD:
1281  lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_FORWARD);
1282  break;
1283  case IDC_PAUSE:
1284  lpttt->lpszText = MAKEINTRESOURCE(IDS_TOOLTIP_PAUSE);
1285  break;
1286  }
1287  break;
1288  }
1289  }
1290  }
1291  break;
1292 
1293  case WM_SIZING:
1294  {
1295  LPRECT pRect = (LPRECT)lParam;
1296 
1297  if (!bIsSingleWindow)
1298  {
1299  if (pRect->right - pRect->left < MAIN_WINDOW_MIN_WIDTH)
1300  pRect->right = pRect->left + MAIN_WINDOW_MIN_WIDTH;
1301 
1302  if (pRect->bottom - pRect->top != MAIN_WINDOW_HEIGHT)
1303  pRect->bottom = pRect->top + MAIN_WINDOW_HEIGHT;
1304  }
1305  return TRUE;
1306  }
1307 
1308  case WM_SIZE:
1309  {
1310  RECT Rect;
1311 
1312  if (hToolBar && hTrackBar)
1313  {
1316  MoveWindow(hTimeDisplay, LOWORD(lParam) - 140, 4, 135, 18, TRUE);
1317 
1318  if (!bIsSingleWindow)
1319  {
1320  UINT Size = GetSystemMetrics(SM_CYMENU) + Rect.bottom;
1322  }
1323  else
1324  {
1325  RECT ToolbarRect;
1326  MCI_DGV_PUT_PARMS mciPut;
1327 
1328  MoveWindow(hTrackBar, 180, 0, LOWORD(lParam) - 322, 25, TRUE);
1329 
1330  GetClientRect(hwnd, &Rect);
1331  GetClientRect(hToolBar, &ToolbarRect);
1332 
1333  mciPut.rc.top = 0;
1334  mciPut.rc.left = 0;
1335  mciPut.rc.right = Rect.right;
1336  mciPut.rc.bottom = Rect.bottom - (ToolbarRect.bottom - ToolbarRect.top) - 2;
1337 
1339  }
1340  }
1341  return 0L;
1342  }
1343 
1344  case WM_HSCROLL:
1345  {
1346  if (hTrackBar == (HWND)lParam)
1347  {
1348  if (wDeviceId)
1349  {
1350  DWORD dwNewPos = (DWORD)SendMessage(hTrackBar, TBM_GETPOS, 0, 0);
1351  SeekPlayback(hwnd, dwNewPos);
1352  }
1353  else
1354  {
1356  }
1357  }
1358  }
1359  break;
1360 
1361  case WM_NCLBUTTONDBLCLK:
1362  {
1363  if (wParam == HTCAPTION)
1364  {
1366  }
1367  }
1368  break;
1369 
1370  case WM_COMMAND:
1371  {
1372  if (LOWORD(wParam) >= IDM_DEVICE_FIRST)
1373  {
1375  break;
1376  }
1377 
1378  switch (LOWORD(wParam))
1379  {
1380  case IDC_PLAY:
1381  case IDC_PAUSE:
1382  {
1383  if (wDeviceId)
1385  else
1386  OpenFileDialog(hwnd, 1, NULL);
1387 
1388  break;
1389  }
1390 
1391  case IDC_STOP:
1392  StopPlayback(hwnd);
1393  break;
1394 
1395  case IDC_EJECT:
1396  break;
1397 
1398  case IDC_BACKWARD:
1399  break;
1400 
1401  case IDC_SEEKBACK:
1403  break;
1404 
1405  case IDC_SEEKFORW:
1407  break;
1408 
1409  case IDC_FORWARD:
1410  break;
1411 
1412  case IDM_OPEN_FILE:
1413  OpenFileDialog(hwnd, 1, NULL);
1414  return 0;
1415 
1416  case IDM_CLOSE_FILE:
1418  break;
1419 
1420  case IDM_REPEAT:
1421  {
1422  if (!bRepeat)
1423  {
1425  bRepeat = TRUE;
1426  }
1427  else
1428  {
1430  bRepeat = FALSE;
1431  }
1432  break;
1433  }
1434 
1435  case IDM_SWITCHVIEW:
1437  break;
1438 
1439  case IDM_DEVPROPS:
1441  break;
1442 
1443  case IDM_VOLUMECTL:
1444  ShellExecute(hwnd, NULL, _T("SNDVOL32.EXE"), NULL, NULL, SW_SHOWNORMAL);
1445  break;
1446 
1447  case IDM_ABOUT:
1448  {
1450  ShellAbout(hwnd, szAppTitle, 0, mplayIcon);
1451  DeleteObject(mplayIcon);
1452  break;
1453  }
1454 
1455  case IDM_EXIT:
1456  PostMessage(hwnd, WM_CLOSE, 0, 0);
1457  return 0;
1458  }
1459  break;
1460  }
1461 
1462  case WM_DESTROY:
1464  PostQuitMessage(0);
1465  return 0;
1466  }
1467 
1468  return DefWindowProc(hwnd, Message, wParam, lParam);
1469 }
1470 
1471 INT WINAPI
1472 _tWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPTSTR lpCmdLine, INT nCmdShow)
1473 {
1474  WNDCLASSEX WndClass = {0};
1475  TCHAR szClassName[] = _T("ROSMPLAY32");
1476  HWND hwnd;
1477  MSG msg;
1478  DWORD dwError;
1479  HANDLE hAccel;
1480 
1481  hInstance = hInst;
1482 
1483  switch (GetUserDefaultUILanguage())
1484  {
1487  break;
1488 
1489  default:
1490  break;
1491  }
1492 
1494 
1495  WndClass.cbSize = sizeof(WndClass);
1496  WndClass.lpszClassName = szClassName;
1497  WndClass.lpfnWndProc = MainWndProc;
1498  WndClass.hInstance = hInstance;
1499  WndClass.style = CS_HREDRAW | CS_VREDRAW;
1501  WndClass.hCursor = LoadCursor(NULL, IDC_ARROW);
1502  WndClass.hbrBackground = (HBRUSH)(COLOR_BTNFACE + 1);
1503  WndClass.lpszMenuName = MAKEINTRESOURCE(IDR_MAINMENU);
1504 
1505  if (!RegisterClassEx(&WndClass))
1506  {
1508  return 0;
1509  }
1510 
1512  szAppTitle,
1514  CW_USEDEFAULT,
1515  CW_USEDEFAULT,
1516  350,
1518  NULL,
1519  NULL,
1520  hInstance,
1521  NULL);
1522  if (!hwnd)
1523  {
1525  return 0;
1526  }
1527 
1529 
1531 
1533 
1534  DisableMenuItems();
1535 
1536  dwError = SearchPath(NULL, _T("SNDVOL32.EXE"), NULL, 0, NULL, NULL);
1537  if (dwError == 0)
1538  {
1540  }
1541 
1542  /* Show it */
1544  UpdateWindow(hwnd);
1545 
1546  if (*lpCmdLine == _T('"'))
1547  {
1548  OpenMediaFile(hwnd, argv[1], NULL);
1549  }
1550  else
1551  {
1552  OpenMediaFile(hwnd, lpCmdLine, NULL);
1553  }
1554 
1555  /* Message Loop */
1556  while (GetMessage(&msg, NULL, 0, 0))
1557  {
1559  {
1561  DispatchMessage(&msg);
1562  }
1563  }
1564 
1566 
1568 
1569  return (INT)msg.wParam;
1570 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define OFN_FILEMUSTEXIST
Definition: commdlg.h:106
HWND hTimeDisplay
Definition: mplay32.c:24
#define IDC_SEEKBACK
Definition: resource.h:72
#define MCI_DGV_PUT_DESTINATION
Definition: digitalv.h:234
#define WS_THICKFRAME
Definition: pedump.c:630
#define TranslateAccelerator
Definition: winuser.h:5835
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define CharLowerBuff
Definition: winuser.h:5713
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define IDR_MAINMENU
Definition: resource.h:40
#define DispatchMessage
Definition: winuser.h:5740
LANGID WINAPI GetUserDefaultUILanguage(void)
Definition: lang.c:806
#define IDB_SEEKBACKICON
Definition: resource.h:11
#define MCI_MODE_STOP
Definition: mmsystem.h:695
BOOL WINAPI TranslateMessage(_In_ const MSG *)
static HICON
Definition: imagelist.c:84
#define IDS_TOOLTIP_SEEKFORW
Definition: resource.h:23
#define TRUE
Definition: types.h:120
#define IDC_BACKWARD
Definition: resource.h:71
#define RegisterClassEx
Definition: winuser.h:5812
static DWORD GetDeviceName(DWORD dwDeviceIndex, LPTSTR lpDeviceName, DWORD dwDeviceNameSize)
Definition: mplay32.c:456
#define MCI_INFO_PRODUCT
Definition: mmsystem.h:752
#define IDS_TOOLTIP_STOP
Definition: resource.h:19
#define MF_BYCOMMAND
Definition: winuser.h:202
long y
Definition: polytest.cpp:48
#define RegQueryInfoKey
Definition: winreg.h:521
#define LAYOUT_RTL
Definition: wingdi.h:1370
#define ERROR_SUCCESS
Definition: deptool.c:10
HWND hTrackBar
Definition: mplay32.c:22
#define MCI_STATUS_ITEM
Definition: mmsystem.h:742
#define DWORD_PTR
Definition: treelist.c:76
#define TBS_ENABLESELRANGE
Definition: commctrl.h:2020
#define IDM_ABOUT
Definition: resource.h:29
#define CreateWindow
Definition: winuser.h:5729
#define MCI_WAIT
Definition: mmsystem.h:730
ULONG_PTR dwItemData
Definition: winuser.h:3225
static VOID TogglePlaybackState(HWND hwnd)
Definition: mplay32.c:807
TCHAR szTime[64]
Definition: solitaire.cpp:18
long x
Definition: polytest.cpp:48
#define IDB_FORWARDICON
Definition: resource.h:13
UINT MaxFilePos
Definition: mplay32.c:35
#define IDS_APPTITLE
Definition: resource.h:3
HWND hwndOwner
Definition: commdlg.h:330
static VOID BuildFileFilterAndDeviceMenu(VOID)
Definition: mplay32.c:951
static MCIERROR OpenMciDevice(HWND hwnd, LPTSTR lpType, LPTSTR lpFileName)
Definition: mplay32.c:552
#define KEY_READ
Definition: nt_native.h:1023
int _tcscmp(const _TCHAR *s1, const _TCHAR *s2)
Definition: tcscmp.h:8
HWND WINAPI SetParent(_In_ HWND, _In_opt_ HWND)
#define mciSendCommand
Definition: mmsystem.h:2861
static VOID ShowMCIError(HWND hwnd, MCIERROR mciError)
Definition: mplay32.c:288
#define TRACKBAR_CLASS
Definition: commctrl.h:2009
#define free
Definition: debug_ros.c:5
TW_UINT32 TW_UINT16 TW_UINT16 MSG
Definition: twain.h:1827
#define SUBLANG_DEFAULT
Definition: nls.h:168
static VOID HandleDeviceMenuItem(HWND hwnd, UINT uItem)
Definition: mplay32.c:1179
#define IDC_SEEKFORW
Definition: resource.h:73
#define CALLBACK
Definition: compat.h:27
#define MF_STRING
Definition: winuser.h:138
DWORD_PTR dwCallback
Definition: mmsystem.h:1537
BOOL WINAPI UpdateWindow(_In_ HWND)
void WINAPI DragAcceptFiles(HWND hWnd, BOOL b)
Definition: shellole.c:527
LONG top
Definition: windef.h:307
#define TBICON_PLAY
Definition: resource.h:59
#define ARRAYSIZE(array)
Definition: filtermapper.c:47
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define ZeroMemory
Definition: winbase.h:1642
#define CS_HREDRAW
Definition: winuser.h:648
BOOL WINAPI DeleteObject(_In_ HGDIOBJ)
HINSTANCE hInstance
Definition: mplay32.c:21
LPCSTR lpstrDefExt
Definition: commdlg.h:345
#define MCI_PLAY
Definition: mmsystem.h:649
#define TBM_SETPOS
Definition: commctrl.h:2032
#define IDM_DEVPROPS
Definition: resource.h:51
#define MCI_RESUME
Definition: mmsystem.h:675
HWND hToolBar
Definition: mplay32.c:23
UINT_PTR WPARAM
Definition: windef.h:207
static VOID StartPlayback(HWND hwnd)
Definition: mplay32.c:773
#define WS_CHILD
Definition: pedump.c:617
LONG left
Definition: windef.h:306
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define IDC_PAUSE
Definition: resource.h:75
#define argv
Definition: mplay32.c:18
#define WS_CLIPCHILDREN
Definition: pedump.c:619
LONG right
Definition: windef.h:308
#define IDB_PLAYICON
Definition: resource.h:7
#define MCI_STATUS_POSITION
Definition: mmsystem.h:745
#define DWORD
Definition: nt_native.h:44
int32_t INT
Definition: typedefs.h:56
#define LANG_HEBREW
Definition: nls.h:67
#define GetOpenFileName
Definition: commdlg.h:665
WPARAM wParam
Definition: combotst.c:138
BOOL bRepeat
Definition: mplay32.c:33
CHAR * LPTSTR
Definition: xmlstorage.h:192
VOID(CALLBACK * TIMERPROC)(HWND, UINT, UINT_PTR, DWORD)
Definition: winuser.h:2872
static VOID InitControls(HWND hwnd)
Definition: mplay32.c:303
const GLfloat * m
Definition: glext.h:10848
#define TB_GETITEMRECT
Definition: commctrl.h:1129
struct tagNMHDR * LPNMHDR
INT WINAPI _tWinMain(HINSTANCE hInst, HINSTANCE hPrevInst, LPTSTR lpCmdLine, INT nCmdShow)
Definition: mplay32.c:1472
WORD wDeviceId
Definition: mplay32.c:32
GLfloat GLfloat GLfloat GLfloat h
Definition: glext.h:7723
#define SearchPath
Definition: winbase.h:3734
DWORD nMaxFile
Definition: commdlg.h:337
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
#define TBM_SETRANGEMIN
Definition: commctrl.h:2034
static VOID ShowLastWin32Error(HWND hwnd)
Definition: mplay32.c:213
#define MCI_STOP
Definition: mmsystem.h:651
#define MB_ICONEXCLAMATION
Definition: winuser.h:779
#define MCI_WINDOW
Definition: mmsystem.h:665
UINT code
Definition: winuser.h:3134
DWORD_PTR dwReturn
Definition: mmsystem.h:1567
#define MAIN_WINDOW_HEIGHT
Definition: mplay32.c:11
#define MCI_GETDEVCAPS_USES_FILES
Definition: mmsystem.h:763
#define IDM_REPEAT
Definition: resource.h:52
HMENU hMainMenu
Definition: mplay32.c:25
#define LoadAccelerators
Definition: winuser.h:5785
#define MAIN_WINDOW_MIN_WIDTH
Definition: mplay32.c:12
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define BTNS_BUTTON
Definition: commctrl.h:994
#define MCI_MODE_RECORD
Definition: mmsystem.h:697
BOOL WINAPI EnableMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
void UpdateTimeDisplay(HWND hwnd)
Definition: mplay32.c:167
LONG WINAPI RegCloseKey(HKEY hKey)
Definition: reg.c:423
HIMAGELIST WINAPI ImageList_Create(INT cx, INT cy, UINT flags, INT cInitial, INT cGrow)
Definition: imagelist.c:804
#define ID_ACCELERATORS
Definition: resource.h:43
unsigned char * LPBYTE
Definition: typedefs.h:52
#define TBICON_EJECT
Definition: resource.h:61
#define TBM_SETRANGEMAX
Definition: commctrl.h:2035
#define IDB_BACKWARDICON
Definition: resource.h:10
#define MCI_SYSINFO_QUANTITY
Definition: mmsystem.h:768
static VOID SwitchViewMode(HWND hwnd)
Definition: mplay32.c:371
#define MCI_FORMAT_MILLISECONDS
Definition: mmsystem.h:701
HACCEL hAccel
Definition: main.c:47
unsigned int BOOL
Definition: ntddk_ex.h:94
#define StringCbPrintfEx
Definition: strsafe.h:600
#define TB_SETCMDID
Definition: commctrl.h:1139
#define TB_AUTOSIZE
Definition: commctrl.h:1133
#define TBM_GETPOS
Definition: commctrl.h:2027
#define IDS_TOOLTIP_EJECT
Definition: resource.h:20
#define MCI_MODE_PLAY
Definition: mmsystem.h:696
#define ShellExecute
Definition: shellapi.h:689
#define MCI_WHERE
Definition: mmsystem.h:667
#define WM_DROPFILES
Definition: winuser.h:1807
#define FORMAT_MESSAGE_ALLOCATE_BUFFER
Definition: winbase.h:400
void ResizeClientArea(HWND hwnd, int nWidth, int nHeight)
Definition: mplay32.c:89
#define GetCurrentDirectory
Definition: winbase.h:3639
#define TTN_GETDISPINFO
Definition: commctrl.h:1874
#define IDC_STOP
Definition: resource.h:69
#define CreateWindowEx
Definition: winuser.h:5730
#define CW_USEDEFAULT
Definition: winuser.h:225
#define MCI_DGV_WHERE_SOURCE
Definition: digitalv.h:444
#define MCI_DGV_WINDOW_DEFAULT
Definition: digitalv.h:459
#define IDT_PLAYTIMER
Definition: mplay32.c:9
#define WM_SIZING
Definition: winuser.h:1789
#define TOOLBARCLASSNAME
Definition: commctrl.h:942
#define TBM_SETPAGESIZE
Definition: commctrl.h:2047
#define IDS_MODE_NOT_READY
Definition: resource.h:37
smooth NULL
Definition: ftsmooth.c:416
static VOID CleanupFileFilter(VOID)
Definition: mplay32.c:1142
DWORD_PTR dwCallback
Definition: mmsystem.h:1591
LONG_PTR LPARAM
Definition: windef.h:208
#define LPRECT
Definition: precomp.h:28
LPTSTR szFilter
Definition: mplay32.c:30
#define MCI_ALL_DEVICE_ID
Definition: mmsystem.h:679
#define MCI_OPEN
Definition: mmsystem.h:646
#define IDS_MODE_OPEN
Definition: resource.h:31
void DisableMenuItems(void)
Definition: mplay32.c:82
HINSTANCE hInstance
Definition: commdlg.h:331
switch(r->id)
Definition: btrfs.c:2904
#define TBICON_FORWARD
Definition: resource.h:65
#define TBM_SETTICFREQ
Definition: commctrl.h:2046
#define SW_SHOW
Definition: winuser.h:769
#define IDB_STOPICON
Definition: resource.h:8
#define MCI_INFO
Definition: mmsystem.h:653
static VOID OpenMediaFile(HWND hwnd, LPTSTR lpFileName, LPTSTR lpType)
Definition: mplay32.c:893
#define FORMAT_MESSAGE_FROM_SYSTEM
Definition: winbase.h:404
#define IDM_SWITCHVIEW
Definition: resource.h:53
BOOL bIsSingleWindow
Definition: mplay32.c:34
UINT_PTR WINAPI SetTimer(_In_opt_ HWND, _In_ UINT_PTR, _In_ UINT, _In_opt_ TIMERPROC)
#define DefWindowProc
Definition: ros2win.h:31
#define WM_DESTROY
Definition: winuser.h:1591
#define MCI_DGV_WINDOW_HWND
Definition: digitalv.h:453
#define MCI_CONFIGURE
Definition: digitalv.h:45
#define MIIM_ID
Definition: winuser.h:717
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint GLint GLint j
Definition: glfuncs.h:250
TCHAR szCurrentFile[MAX_PATH]
Definition: mplay32.c:29
#define PostMessage
Definition: winuser.h:5807
#define OFN_PATHMUSTEXIST
Definition: commdlg.h:117
#define IDS_MODE_PLAY
Definition: resource.h:33
DWORD dwTime
Definition: solitaire.cpp:25
void EnableMenuItems(HWND hwnd)
Definition: mplay32.c:54
BOOL WINAPI SetProcessDefaultLayout(DWORD dwDefaultLayout)
Definition: window.c:1716
#define MCI_STATUS
Definition: mmsystem.h:662
#define CCS_BOTTOM
Definition: commctrl.h:2240
#define GetMenuItemInfo
Definition: winuser.h:5763
#define MF_CHECKED
Definition: winuser.h:132
#define WS_CAPTION
Definition: pedump.c:624
#define TB_SETIMAGELIST
Definition: commctrl.h:1146
#define LPTOOLTIPTEXT
Definition: commctrl.h:1886
#define CS_VREDRAW
Definition: winuser.h:653
char TCHAR
Definition: xmlstorage.h:189
#define _T(x)
Definition: vfdio.h:22
LRESULT CALLBACK MainWndProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
Definition: mplay32.c:1213
static const WCHAR szClassName[]
Definition: clipbrd.c:11
#define IDS_TOOLTIP_SEEKBACK
Definition: resource.h:22
#define StringCbCat
Definition: strsafe.h:334
static const TBBUTTON Buttons[]
Definition: mplay32.c:41
#define SS_CENTER
Definition: pedump.c:693
#define IDS_MODE_STOP
Definition: resource.h:32
#define WS_OVERLAPPED
Definition: pedump.c:615
#define BTNS_SEP
Definition: commctrl.h:995
#define d
Definition: ke_i.h:81
#define MCI_STATUS_LENGTH
Definition: mmsystem.h:744
#define MCI_OPEN_TYPE
Definition: mmsystem.h:739
#define IDB_SEEKFORWICON
Definition: resource.h:12
#define IDS_MODE_SEEK
Definition: resource.h:36
#define WM_SIZE
Definition: winuser.h:1593
#define IDC_EJECT
Definition: resource.h:70
#define MCI_TEST
Definition: digitalv.h:32
#define IDM_OPEN_FILE
Definition: resource.h:46
LPCSTR lpstrInitialDir
Definition: commdlg.h:340
#define ILC_COLOR24
Definition: commctrl.h:353
static const WCHAR szStatus[]
Definition: http.c:74
#define IDB_PAUSEICON
Definition: resource.h:14
#define StringCbPrintf
Definition: strsafe.h:544
static VOID SeekBackPlayback(HWND hwnd)
Definition: mplay32.c:711
#define MF_ENABLED
Definition: winuser.h:128
#define WM_CLOSE
Definition: winuser.h:1603
#define RGB(r, g, b)
Definition: wingdi.h:2939
#define MAX_PATH
Definition: compat.h:26
DWORD lStructSize
Definition: commdlg.h:329
#define WINAPI
Definition: msvc.h:6
const GLubyte * c
Definition: glext.h:8905
TCHAR szAppTitle[256]
Definition: mplay32.c:27
unsigned short WORD
Definition: ntddk_ex.h:93
int WINAPI GetSystemMetrics(_In_ int)
unsigned long DWORD
Definition: ntddk_ex.h:95
static DWORD GetNumDevices(VOID)
Definition: mplay32.c:439
static VOID CloseMediaFile(HWND hwnd)
Definition: mplay32.c:881
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
#define ShellAbout
Definition: shellapi.h:688
#define TBSTYLE_TOOLTIPS
Definition: commctrl.h:985
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
static BOOL DeviceUsesFiles(LPTSTR lpDeviceName)
Definition: mplay32.c:500
#define MCI_STATUS_MODE
Definition: mmsystem.h:747
MCIDEVICEID wDeviceID
Definition: mmsystem.h:1522
#define INVALID_FILE_ATTRIBUTES
Definition: vfdcmd.c:23
static DWORD GetDeviceMode(HWND hwnd)
Definition: mplay32.c:635
#define IDM_CLOSE_FILE
Definition: resource.h:47
CHAR Message[80]
Definition: alive.c:5
#define MCI_NOTIFY_SUCCESSFUL
Definition: mmsystem.h:725
DWORD MCIERROR
Definition: mmsystem.h:958
VOID CALLBACK PlayTimerProc(HWND hwnd, UINT uMsg, UINT_PTR idEvent, DWORD dwTime)
Definition: mplay32.c:757
#define FormatMessage
Definition: winbase.h:3629
BOOL WINAPI KillTimer(_In_opt_ HWND, _In_ UINT_PTR)
#define StringCbCopy
Definition: strsafe.h:155
#define TBICON_SEEKFORW
Definition: resource.h:64
static const WCHAR L[]
Definition: oid.c:1250
#define IDI_MAIN
Definition: resource.h:4
_In_ PCCERT_CONTEXT _In_ DWORD dwFlags
Definition: wincrypt.h:1175
#define IDS_MODE_UNKNOWN
Definition: resource.h:30
#define COLOR_BTNFACE
Definition: winuser.h:918
#define MIIM_TYPE
Definition: winuser.h:720
#define MB_ICONERROR
Definition: winuser.h:781
#define TB_ADDBUTTONS
Definition: commctrl.h:1267
#define IDS_TOOLTIP_PLAY
Definition: resource.h:18
#define IDC_FORWARD
Definition: resource.h:74
#define ILC_MASK
Definition: commctrl.h:347
#define IDS_TOOLTIP_PAUSE
Definition: resource.h:25
#define TB_CHANGEBITMAP
Definition: commctrl.h:1140
static VOID SetImageList(HWND hwnd)
Definition: mplay32.c:238
#define OFN_HIDEREADONLY
Definition: commdlg.h:107
GLdouble s
Definition: gl.h:2039
#define MessageBox
Definition: winuser.h:5797
#define MCI_GETDEVCAPS_ITEM
Definition: mmsystem.h:758
#define WS_TABSTOP
Definition: pedump.c:634
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1722
static const WCHAR szDeviceName[]
Definition: provider.c:56
IN PVOID IN PVOID IN USHORT IN USHORT Size
Definition: pci.h:359
static const WCHAR Cleanup[]
Definition: register.c:80
uint32_t DWORD_PTR
Definition: typedefs.h:63
#define MF_UNCHECKED
Definition: winuser.h:204
BOOL WINAPI MoveWindow(_In_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ BOOL)
#define IDS_ALL_TYPES_FILTER
Definition: resource.h:26
#define GetFileAttributes
Definition: winbase.h:3649
#define LoadCursor
Definition: winuser.h:5787
#define OFN_SHAREAWARE
Definition: commdlg.h:119
#define MCI_SEEK_TO_START
Definition: mmsystem.h:740
#define IDS_DEFAULTMCIERRMSG
Definition: resource.h:28
#define HTCAPTION
Definition: winuser.h:2451
static VOID StopPlayback(HWND hwnd)
Definition: mplay32.c:652
#define FORMAT_MESSAGE_IGNORE_INSERTS
Definition: winbase.h:401
BOOL WINAPI GetClientRect(_In_ HWND, _Out_ LPRECT)
static DWORD GetDeviceFriendlyName(LPTSTR lpDeviceName, LPTSTR lpFriendlyName, DWORD dwFriendlyNameSize)
Definition: mplay32.c:470
#define RegOpenKeyEx
Definition: winreg.h:520
RECT PrevWindowPos
Definition: mplay32.c:36
#define TBICON_BACKWARD
Definition: resource.h:62
#define SW_SHOWNORMAL
Definition: winuser.h:764
HINSTANCE hInst
Definition: dxdiag.c:13
BOOL WINAPI DestroyAcceleratorTable(_In_ HACCEL)
#define MCI_MODE_NOT_READY
Definition: mmsystem.h:694
#define WS_MINIMIZEBOX
Definition: pedump.c:631
DWORD_PTR dwCallback
Definition: mmsystem.h:1521
LPSTR lpstrFile
Definition: commdlg.h:336
static VOID SeekForwPlayback(HWND hwnd)
Definition: mplay32.c:734
#define MCI_PUT
Definition: mmsystem.h:666
HLOCAL NTAPI LocalFree(HLOCAL hMem)
Definition: heapmem.c:1577
DWORD_PTR dwCallback
Definition: mmsystem.h:1517
#define MM_MCINOTIFY
Definition: mmsystem.h:55
#define IDC_PLAY
Definition: resource.h:68
#define TBICON_SEEKBACK
Definition: resource.h:63
LPCSTR lpstrDeviceType
Definition: mmsystem.h:1523
static VOID SeekPlayback(HWND hwnd, DWORD dwNewPos)
Definition: mplay32.c:687
#define MCI_OPEN_ELEMENT
Definition: mmsystem.h:735
#define SS_SUNKEN
Definition: winuser.h:358
#define MCI_MODE_SEEK
Definition: mmsystem.h:698
#define SetWindowText
Definition: winuser.h:5832
LPCSTR lpstrFilter
Definition: commdlg.h:332
unsigned int UINT
Definition: ndis.h:50
#define WM_HSCROLL
Definition: winuser.h:1725
#define MB_OK
Definition: winuser.h:784
#define IMAGE_BITMAP
Definition: winuser.h:211
#define GetMessage
Definition: winuser.h:5765
#define IDM_EXIT
Definition: resource.h:27
#define MCI_CLOSE
Definition: mmsystem.h:647
#define MCI_GETDEVCAPS
Definition: mmsystem.h:654
#define MAX_MCISTR
Definition: mplay32.c:13
#define DragQueryFile
Definition: shellapi.h:682
#define StringCbCopyEx
Definition: strsafe.h:192
#define IDB_EJECTICON
Definition: resource.h:9
#define TBICON_STOP
Definition: resource.h:60
#define msg(x)
Definition: auth_time.c:54
#define IDC_ARROW
Definition: winuser.h:682
#define IDM_VOLUMECTL
Definition: resource.h:50
#define IDS_TOOLTIP_FORWARD
Definition: resource.h:24
#define SendMessage
Definition: winuser.h:5818
_TCHAR * _tcsrchr(const _TCHAR *s, _XINT c)
Definition: tcsrchr.h:4
void WINAPI DragFinish(HDROP h)
Definition: shellole.c:543
#define TBSTATE_ENABLED
Definition: commctrl.h:970
#define WM_CREATE
Definition: winuser.h:1590
#define IDM_DEVICE_FIRST
Definition: resource.h:56
#define MCI_MODE_PAUSE
Definition: mmsystem.h:699
#define MCI_PAUSE
Definition: mmsystem.h:652
#define MCI_MODE_OPEN
Definition: mmsystem.h:700
#define MCI_FROM
Definition: mmsystem.h:731
#define HIWORD(l)
Definition: typedefs.h:246
unsigned int ULONG
Definition: retypes.h:1
#define MAKELANGID(p, s)
Definition: nls.h:15
LONG bottom
Definition: windef.h:309
#define MCI_DGV_RECT
Definition: digitalv.h:232
#define MCI_DEVTYPE_WAVEFORM_AUDIO
Definition: mmsystem.h:689
static DWORD InsertDeviceMenuItem(HMENU hMenu, UINT uItem, BOOL fByPosition, UINT uItemID, DWORD dwDeviceIndex)
Definition: mplay32.c:914
#define malloc
Definition: debug_ros.c:4
#define IDS_TOOLTIP_BACKWARD
Definition: resource.h:21
#define SM_CYMENU
Definition: winuser.h:966
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define LoadImage
Definition: winuser.h:5790
INT WINAPI ImageList_AddMasked(HIMAGELIST himl, HBITMAP hBitmap, COLORREF clrMask)
Definition: imagelist.c:563
VOID WINAPI InitCommonControls(void)
Definition: commctrl.c:863
#define LoadIcon
Definition: winuser.h:5788
#define MCI_SYSINFO_NAME
Definition: mmsystem.h:770
#define MF_GRAYED
Definition: winuser.h:129
DWORD nFilterIndex
Definition: commdlg.h:335
#define MIIM_DATA
Definition: winuser.h:721
#define MCI_STATUS_TIME_FORMAT
Definition: mmsystem.h:749
LONG_PTR LRESULT
Definition: windef.h:209
#define MCI_NOTIFY
Definition: mmsystem.h:729
static VOID ShowDeviceProperties(HWND hwnd)
Definition: mplay32.c:868
TCHAR szDefaultFilter[MAX_PATH]
Definition: mplay32.c:28
#define LR_DEFAULTCOLOR
Definition: winuser.h:1077
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_SYSMENU
Definition: pedump.c:629
HMENU WINAPI GetMenu(_In_ HWND)
LPCSTR lpstrElementName
Definition: mmsystem.h:1524
LPSTR dwTypeData
Definition: winuser.h:3226
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
static VOID OpenFileDialog(HWND hwnd, DWORD dwFilterIndex, LPTSTR lpType)
Definition: mplay32.c:1148
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define RegEnumValue
Definition: winreg.h:511
__analysis_noreturn void WINAPI PostQuitMessage(_In_ int)
#define LoadString
Definition: winuser.h:5794
#define MCI_SEEK
Definition: mmsystem.h:650
#define TBSTYLE_FLAT
Definition: commctrl.h:988
#define MCI_TO
Definition: mmsystem.h:732
#define WM_NOTIFY
Definition: richedit.h:61
struct Rect Rect
WCHAR WndClass[]
Definition: capicon.c:23
#define InsertMenuItem
Definition: winuser.h:5779
#define IDS_MODE_PAUSE
Definition: resource.h:34
_In_ LPCSTR lpFileName
Definition: winbase.h:3028
#define LANG_USER_DEFAULT
Definition: tnerror.cpp:50
#define mciGetErrorString
Definition: mmsystem.h:2865
#define IDS_MODE_RECORD
Definition: resource.h:35
#define WM_NCLBUTTONDBLCLK
Definition: winuser.h:1676
DWORD_PTR dwCallback
Definition: mmsystem.h:1573
void UpdateWindowCaption(HWND hwnd)
Definition: mplay32.c:102
#define MCI_SYSINFO
Definition: mmsystem.h:659
#define HKEY_LOCAL_MACHINE
Definition: winreg.h:12
static MCIERROR CloseMciDevice(VOID)
Definition: mplay32.c:532
DWORD Flags
Definition: commdlg.h:342
#define TBM_SETLINESIZE
Definition: commctrl.h:2049