Microsoft KB Archive/114104

From BetaArchive Wiki

BUG: "Visible" Property Ignored when Loading VBX Controls

Q114104

1.00 1.50 WINDOWS kbprg kbbuglist ---------------------------------------------------------------------- The information in this article applies to: - The Microsoft Foundation Classes (MFC) included with: - Microsoft Visual C++ for Windows, versions 1.0 and 1.5 ---------------------------------------------------------------------- SYMPTOMS ======== After using the App Studio resource editor to disable the visible property of a VBX that is contained in a dialog, the VBX remains visible when the dialog is displayed. RESOLUTION ========== NOTE: This information is taken from the section titled "Part 2: Visual Workbench" in the README.WRI file typically found in the \MSVC\HELP directory. Using the VBX Visible Property ------------------------------ The Visible property of a VBX control can only be changed at run-time; you cannot make a VBX control initially invisible from AppStudio or an .RC file. To make a control invisible, you must hide the control explicitly from your code. To make a control initially invisible in a dialog, override the OnInitDialog function in your CDialog-derived class, and call ShowWindow( SW_HIDE ) for the VBX controls that you want to hide. For example: BOOL CMyDialog::OnInitDialog { CDialog::OnInitDialog(); // make the control identified by IDC_GRID1 invisible GetDlgItem(IDC_GRID1)->ShowWindow(SW_HIDE); // other dialog initializations... } STATUS ====== Microsoft has confirmed this to be a bug in the Microsoft Foundation Classes for Windows, versions 2.0 and 2.5. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available. Additional reference words: 1.00 1.50 2.00 2.50 KBCategory: kbprg kbbuglist KBSubcategory: MfcVBX

Keywords : kb16bitonly
Issue type : kbbug
Technology : kbAudDeveloper kbMFC


Last Reviewed: May 5, 2001
© 2001 Microsoft Corporation. All rights reserved. Terms of Use.