FILE: Sample Corrects Scrolling Problems in GRID.VBXID: Q108901
|
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.exeFor more information about downloading files from the Microsoft Software Library, please see the following article in the Microsoft Knowledge Base:
Q119591 How to Obtain Microsoft Support Files from Online Services
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[ASCII 146]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 : kbfile kbsample kb16bitonly kbMFC kbVBX kbVC
Version : 1.0 1.5
Platform : WINDOWS
Issue type :
Last Reviewed: August 3, 1999