void SetGridWnd(CWnd* pGridWnd = NULL, CDocument* pGridDoc = NULL, BOOL bIsViewContext = FALSE);
pGridWnd
A pointer to the parent CWnd object for the CGXGridCore object.
pGridDoc
A pointer to the document, if any. Otherwise NULL.
bIsViewContextYou
hould pass TRUE for this parameter if the grid is used in a CView.
Stores a pointer to the associated CWnd object. This pointer is initialized in the constructor of the derived CGXGridView or CGXGridWnd class and points to the CWnd of the left-hand branch.
If you are working with a derived grid-view or grid-window, you do not need access to the gridwnd pointer and you do not need to call SetGridWnd. The gridwnd pointer is the this-pointer of your derived class. CGXGridView and CGXGridWnd already do the necessary initialization.
This example illustrates the initialization of the pointer:
// Include-Datei
class CGXGridView : public CGXView, public CGXGridCore
{
////////////////////
// Constructors
protected: // create from serialization only
CGXGridView( );
GRID_DECLARE_DYNCREATE(CGXGridView)
...
};
// Implementation file
CGXGridView::CGXGridView( )
{
SetGridWnd(this);
}
...
Class Overview | Class Members