Sample Corrects Scrolling Problems In GRID.VBX

----------------------------------------------------------------------
The information in this article applies to:

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

SUMMARY
=======

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

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

GRIDFIX can be found in the Software/Data Library by searching on the
word GRIDFIX.ZIP, the Q number of this article, or Sxxxxx.
GRIDFIX.ZIP was archived using the PKware file-compression utility.

MORE INFORMATION
================

GRIDFIX demonstrates the correct procedure for subclassing a VBX
control in an MFC 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 arrow keys,
the home/end keys, pageup/pagedown and shift keys. Unfortunately,
arrow keys are intercepted by the dialog manager which uses them
to traverse the controls on the dialog.

The keyboard interface is implemented by handling WM_GETDLGCODE in
the subclassed grids message handler. DLGC_WANTARROWS is returned
which allows arrow keys to be forwarded to the control. The full
keyboard interface will allow 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.

This 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.


Contributed by:  Phillip Cooper        Microsoft Developer Support
