PRB: MFC Has Tabstop Property On by Default for VBX ControlsLast reviewed: July 22, 1997Article ID: Q113060 |
1.00 1.50
WINDOWS
kbprg kbprb
The information in this article applies to:
SYMPTOMSIf a VBX control does not make the Tabstop property available for modification at design time using App Studio then the Tabstop property will be turned on when the control is created. Under App Studio, the properties are shown for Tabstop as OFF (not checked) and DISABLED (grayed).
MORE INFORMATIONApp Studio is behaving properly because the setting is not modifiable (thus, DISABLED). MFC sets the Tabstop property when the VBX is created. There is a WS_TABSTOP setting in the .RC file in the list of styles for the control, but removing this has no effect. These settings are ignored for VBX controls. This problem is apparent when using controls for which you wouldn't normally expect to have a Tabstop property set. For example, the Frame 3D control that shipped with the Visual Control Pack is intended as a frame, and you normally wouldn't want to be able to tab to it directly. Following is a list of controls included in the Visual Control Pack that will be affected by this behavior:
Frame3D Panel3D Group3D SpinButton VBSQL RESOLUTIONSheridan Software has an updated version of THREED.VBX that will fix the problem for Frame3D, Panel3D, and Group3D. This update is available to registered users and can be obtained from:
Sheridan Software Systems, Inc. 65 Maxess Road Melville, NY 11747 Phone: (516) 753-0985 Fax: (516) 293-4155 BBS: (516) 753-5452 (2400 baud) or (516) 753-6510 (9600 baud)You will need the THREED.VBX file dated 7/16/93 or later. The third-party product included here is manufactured by a vendor independent of Microsoft; we make no warranty, implied or otherwise, regarding this product's performance or reliability. For other VBX controls, the problem can be resolved by explicitly removing the Tabstop property from the control after it has been created. This can be done in the initialization phase of your CDialog or CFormView class. Assume your class is called CMyDialog or CMyForm and the ID of the VBX control for which you do NOT want the Tabstop property set is IDC_VBX1. For CMyDialog, follow these steps:
Change the following
if (dwStyle == NULL) // NULL means use default dwStyle = GetModelStyles() | WS_CHILD | WS_TABSTOP; else dwStyle |= WS_CHILD; // Guarantee WS_CHILD is setto the following:
if (dwStyle == NULL) // NULL means use default dwStyle = GetModelStyles() | WS_CHILD ; else dwStyle |= WS_CHILD; // Guarantee WS_CHILD is setOnce the change has been made, then rebuild the MFC libraries. For more information on building these library files, refer to one of the following resources:
|
Additional reference words: 1.00 1.50 2.00 2.50 SpinButton SSFrame SSPanel
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |