FIX: CDatabase::Open Uses Wrong Handle for the Parent WindowLast reviewed: September 18, 1997Article ID: Q125730 |
1.50
WINDOWS
kbother kbfixlist kbbuglist
The information in this article applies to:
SYMPTOMSIf an application calls CDatabase::Open and does not pass a data source name as the first argument, a dialog with a list of data sources is displayed. If the call to CDatabase::Open was made from a dialog box that is modal to the application's main window, the following incorrect behavior will be observed: - Although the data source name dialog is modal, it is possible to activate the first dialog without first closing the data sources dialog.- When the data source name dialog is closed, the application's main window is activated rather than the first dialog. CAUSECDatabase::Open uses the wrong window handle for the parent window of the data source name dialog box.
RESOLUTIONDo not call CDatabase::Open to display a dialog box if there is an active popup window owned by the main application window.
STATUSMicrosoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This bug was corrected in Visual C++ for Windows, version 1.51.
MORE INFORMATIONCDatabase::Open uses the handle associated with the main application window as the parent window handle passed to SQLDriverConnect. The handle will be not be the correct one if there are other active popup windows owned by the main application window. The correct window in that situation should be retrieved by calling GetLastActivePopup.
|
Additional reference words: 2.50 1.50
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |