FIX: Invisible at Run Time ActiveX Control, Visible at Run Time (189585)
The information in this article applies to:
- The Microsoft Foundation Classes (MFC), when used with:
- Microsoft Visual C++, 32-bit Enterprise Edition 5.0
- Microsoft Visual C++, 32-bit Enterprise Edition 6.0
- Microsoft Visual C++, 32-bit Professional Edition 5.0
- Microsoft Visual C++, 32-bit Professional Edition 6.0
- Microsoft Visual C++, 32-bit Learning Edition 6.0
This article was previously published under Q189585 SYMPTOMS
An invisible run-time ActiveX control is visible at run time if it is the
only control on a dialog box.
CAUSE
This problem occurs because there is no other control the focus can be set
to, so AppWizard-generated MFC code sets focus to the only control there
(that is, returns TRUE in the OnInitDialog() function of your CDialog-
derived class), and therefore activates it.
RESOLUTION
Change the return value of the OnInitDialog() function in your derived
CDialog class from TRUE to FALSE.
STATUS
Microsoft has confirmed this to be a bug in the Microsoft products listed
at the beginning of this article.
This problem was corrected in Microsoft Visual C++ .NET.
Modification Type: | Major | Last Reviewed: | 12/10/2003 |
---|
Keywords: | kbBug kbContainer kbCtrl kbfix kbNoUpdate KB189585 |
---|
|