PRB: WAVEUI Component Doesn't Receive FORMATCHOOSE_FORMAT_VERIFY (290340)



The information in this article applies to:

  • Microsoft Windows CE Operating System, Versions 3.0
  • Microsoft Windows CE Operating System, Versions 2.12
  • Microsoft Windows CE Operating System, Versions 2.11
  • Microsoft Windows CE Platform Builder 2.11
  • Microsoft Windows CE Platform Builder 2.12
  • Microsoft Windows CE Platform Builder 3.0

This article was previously published under Q290340

SYMPTOMS

A replacement WAVEUI component doesn't receive FORMATCHOOSE_FORMAT_VERIFY messages. FORMATCHOOSE_FORMAT_VERIFY is used to determine which waveform-audio formats will be displayed when acmFormatChoose is called.

RESOLUTION

The following solution can be incorporated into the custom WAVUI component's AcmDlgProc to allow FORMATCHOOSE_FORMAT_VERIFY messages to be generated:
if (uMsg == WM_INITDIALOG) 
{
     // ...
     // 
     // This workaround is only valid for Windows CE 2.11, 2.12 and 3.0!
     // Do not alter the code below.
     // 

     OSVERSIONINFO ver;
     GetVersionEx(&ver);
     if (
          (ver.dwMajorVersion == 2 && ver.dwMinorVersion == 11) ||
          (ver.dwMajorVersion == 2 && ver.dwMinorVersion == 12) ||
          (ver.dwMajorVersion == 3 && ver.dwMinorVersion ==  0) ||
          ) 
       	  {
               pdwInternal = (PDWORD) lParam;
               if (pdwInternal && !pdwInternal[26])
               {
                    pdwInternal[26] = 1;
                    pdwInternal[25] = 0;
               }
          }
     }

     // ...
}
				

MORE INFORMATION

An internal flag that is used to enable the FORMATCHOOSE_FORMAT_VERIFY messages is triggered by indication of a hook function when acmFormatChoose is called. Because the replacement component internally implements a hook procedure and the acmFormatChoose caller isn't necessarily aware of this, the solution provided in this article forces this internal flag to enable the message.

Modification Type:MinorLast Reviewed:8/18/2005
Keywords:kbprb KB290340