PRB: TAB Key, Mnemonics with FindText and ReplaceText Dialogs

ID: Q96134


The information in this article applies to:
  • Microsoft Win32 Software Development Kit (SDK)
  • Microsoft Windows Software Development Kit (SDK) 3.1
  • Microsoft Windows 2000


SYMPTOMS

When implementing the FindText and/or ReplaceText common dialog box, the dialog box is displayed but the TAB key and mnemonics do not work properly.


CAUSE

The FindText and ReplaceText common dialog boxes are modeless dialog boxes. Therefore, a call to IsDialogMessage must be made in the application's main message loop in order for the TAB key and mnemonics to work properly.


RESOLUTION

This problem can be corrected by adding a call to IsDialogMessage() in the application's main message loop.


MORE INFORMATION

A typical message loop might resemble the following:


   while (GetMessage(&msg,NULL,NULL,NULL))
     {
        if ( ghFFRDlg==NULL || !IsDialogMessage(ghFFRDlg, &msg) )
           {
              TranslateMessage(&msg);
              DispatchMessage(&msg);
           }
     } 
Where ghFFRDlg is a global window handle for the currently active modeless common dialog box.

Additional query words:

Keywords : kbCmnDlg kbCmnDlgFind kbCmnDlgRepl kbNTOS kbWinOS2000 kbSDKWin32 kbGrpUser kbWinOS
Version : WINDOWS:3.1
Platform : WINDOWS
Issue type : kbprb


Last Reviewed: January 26, 2000
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.