Objective Grid: Deriving a grid class

Article ID: 421
Last updated: 27 Apr, 2018
Article ID: 421
Last updated: 27 Apr, 2018
Revision: 3
Views: 3193
Posted: 09 Jan, 2001
by Meltreger B.
Updated: 27 Apr, 2018
by Meltreger B.

Problem

 


How can I create a derived class for a grid?

 

 


Cause

 


 

 


Action

 


Two steps are necessary to derive a class from a CGXGridWnd:

  1. Create a new class with ClassWizard. Use "generic CWnd" as Class Type.
  2. Using a text editor, change the derivation in your window class, in both the .h and .cpp files. All references to CWnd should be replaced by CGXGridWnd.

If you want to derive a class from CGXGridView use the following steps instead:

  1. Create a new class with ClassWizard. Use "CView" as Class Type.
  2. Using a text editor, change the derivation in your window class, in both the .h and .cpp files. All references to CView should be replaced by CGXGridView.
  3. Change the generated OnDraw(), OnBeginPrinting() and OnEndPrinting() method and call CGXGridView.

This article was:   Helpful | Not helpful
Report an issue
Article ID: 421
Last updated: 27 Apr, 2018
Revision: 3
Views: 3193
Posted: 09 Jan, 2001 by Meltreger B.
Updated: 27 Apr, 2018 by Meltreger B.

Others in this category