FILE: Sample Corrects Scrolling Problems in GRID.VBX

Last reviewed: July 22, 1997
Article ID: Q108901
The information in this article applies to:
  • The Microsoft Foundation Classes (MFC) included with:

        - Microsoft Visual C++ for Windows, versions 1.0, 1.5
    

SUMMARY

GRIDFIX is a sample application the primary purpose of which is to provide a workaround for scrolling problems exhibited by GRID.VBX when used with Microsoft Visual C++ versions 1.0 and 1.5 for Windows.

This sample program also implements a complete keyboard interface for GRID.VBX.

The following file is available for download from the Microsoft Software Library:

 ~ Gridfix.exe (size: 142589 bytes) 

For more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:

   ARTICLE-ID: Q119591
   TITLE     : How to Obtain Microsoft Support Files from
               Online Services

MORE INFORMATION

GRIDFIX demonstrates the correct procedure for subclassing a VBX control in a Microsoft Foundation Class (MFC) Libraries application. As a result of the subclassing procedure, the program has access to vertical and horizontal scroll messages and uses them to manually implement scrolling.

This sample program also implements a keyboard interface. This interface is normally used to navigate the grid using the arrow, HOME/END, PAGE UP/PAGE DOWN, and SHIFT keys. Unfortunately, the arrow keys are intercepted by the dialog manager, which uses them to traverse the controls on the dialog box.

The keyboard interface is implemented by handling WM_GETDLGCODE in the subclassed grid’s message handler. DLGC_WANTARROWS is returned, which allows arrow keys to be forwarded to the control. The full keyboard interface allows grid navigation and region highlighting.

If you want to disable keyboard highlighting, remove the handlers for the WM_KEYDOWN and WM_KEYUP messages. If you want to totally disable the keyboard interface (but still correct scrolling problems), remove the handler for WM_GETDLGODE as well.

The GRIDFIX sample contains a copy of GRID.VBX. To use this control in a design-time environment (such as App Studio), you must have the license file VC.LIC in your WINDOWS\SYSTEM directory. This file is normally installed by the Setup program for Microsoft Visual C++ versions 1.0 and 1.5 for Windows.


Additional query words: VBX thumb
Keywords : kb16bitonly kbfile kbsample MfcVBX
Technology : kbmfc
Version : 1.0 1.5
Platform : WINDOWS
Resolution Type : kbfile


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: July 22, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.