Fix a couple of minor bugs in the new MCIWnd code

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hello,

Changelog:
    Dmitry Timoshkov <dmitry@xxxxxxxxxxxxxxx>
    Trackbar range should be fixed only in the case of successful
    mciSendStringW. It's better to initialize dwCallback parameter
    if MCI_NOTIFY is specified.

--- cvs/hq/wine/dlls/msvideo/mciwnd.c   2004-01-01 15:33:52.000000000 +0800
+++ wine/dlls/msvideo/mciwnd.c  2004-01-01 15:37:37.000000000 +0800
@@ -1085,15 +1085,16 @@ end_of_mci_open:
                 strcatW(cmdW, (WCHAR *)lParam);
 
                 mwi->lasterror = mciSendStringW(cmdW, NULL, 0, 0);
+
+                /* fix the range tracking according to the new time format */
+                if (!mwi->lasterror)
+                    SendDlgItemMessageW(hWnd, CTL_TRACKBAR, TBM_SETRANGEMAX, 1,
+                                        SendMessageW(hWnd, MCIWNDM_GETLENGTH, 0, 0));
             }
 
             if (wMsg == MCIWNDM_SETTIMEFORMATA)
                 HeapFree(GetProcessHeap(), 0, (void *)lParam);
 
-            /* fix the range tracking according to the new time format */
-            if (!mwi->lasterror)
-                SendDlgItemMessageW(hWnd, CTL_TRACKBAR, TBM_SETRANGEMAX, 1,
-                                    SendMessageW(hWnd, MCIWNDM_GETLENGTH, 0, 0));
             return 0;
         }
 
@@ -1159,9 +1160,12 @@ end_of_mci_open:
         {
             MCI_SET_PARMS mci_set;
 
+            mci_set.dwCallback = (DWORD_PTR)hWnd;
             mwi->lasterror = mciSendCommandW(mwi->mci, MCI_SET,
                                              MCI_SET_DOOR_OPEN | MCI_NOTIFY,
                                              (DWORD_PTR)&mci_set);
+            MCIWND_notify_mode(mwi);
+            MCIWND_UpdateState(mwi);
             return mwi->lasterror;
         }
 





[Index of Archives]     [Gimp for Windows]     [Red Hat]     [Samba]     [Yosemite Camping]     [Graphics Cards]     [Wine Home]

  Powered by Linux