BUG: MCIWndGetPositionString Makes Time Format Milliseconds

Last reviewed: August 21, 1995
Article ID: Q135304
The information in this article applies to:
  • Microsoft Video for Windows Development Kit version 1.1
  • Microsoft Win32 Software Development Kit (SDK) versions 3.1, 3.5, 3.51, 4.0

SYMPTOMS

Calling MCIWndGetPositionString causes the time format (set with MCIWndSetTimeFormat) to change to milliseconds. This applies only to devices that have tracks.

WORKAROUND

To work around the problem, reset the time format after calling MCIWndGetPositionString as follows:

#ifdef _WIN32

TCHAR pszFormat[30]; // Use a TCHAR in Win32 TCHAR pszPosition[30];

#else // Not Win32

char pszFormat[30];
char pszPosition[30];
#endif

   // Get the time format - hWnd is the hWnd of the MCIWnd
   MCIWndGetTimeFormat(hWnd, pszFormat, sizeof(pszFormat));

   // Get the position - hWnd is the hWnd of the MCIWnd
   MCIWndGetPositionString(hWnd, pszPosition, sizeof(pszPosition));

   // Reset the time format - hWnd is the hWnd of the MCIWnd
   if (0 == MCIWndSetTimeFormat(hWnd, pszFormat))
      // Successful
   else
      // Could not reset time format

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.


Additional reference words: 3.50 3.10 4.00
KBCategory: kbmm kbbuglist kbprg kbcode
KBSubcategory: MMVideo MMMisc MCIWnd


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: August 21, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.