Flexgrid control can't be created on machines that haven't VC6 installed?
Posted on 2001-06-21
I want to use the MSFlexGrid control in a doc/view vc++ program. The
control shows up perfectly on my machine, which has Visual Studio 6.0
installed. However, on those machines that don't have VS6 installed, the
control doesn't show up at all, even it I have the same control registered
I first inserted this control to the project by using the Projects->Add
to Project->Components and Controls menu item. The IDE automatically created
the CMSFlexGrid class. Then I added a member variable to the view class:
And in the view's OnCreate() method, I addded this code:
int CSView::OnCreate(LPCREATESTRUCT lpCreateStruct)
if (CView::OnCreate(lpCreateStruct) == -1)
// TODO: Add your specialized creation code here
m_grid.Create("gird","gird", WS_CHILD|WS_VISIBLE, rc,this, 101); // this
The control showed up on my machine. But it just couldn't be created on
those machine that haven't vs6 installed. The m_grid.Create() always returns
false, according to a debugging test.
Wierd is that if I just added the control to a dialog based application, and
added a member variable for the control using the class wizard, that is, let
the framework to do the things for me, the flexgrid control always shows up,
whether on my computer or on those.
Anybody could give me a hint? I'm really bewildered at this. Thank you very