G
gzyhp
Unregistered / Unconfirmed
GUEST, unregistred user!
我用VC++6做一个Active X控件。用MFC Wizard生成,选中acts as
a sample frame control,然后引入控件Microsoft FlexGrid Control,Version 6.0,
包含其头文件,增加一个该类的对象,然后:
int CC1Ctrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (COleControl::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
//我加入的代码:
m_fgrid.Create(NULL, WS_VISIBLE, CRect(50,50,100,100), this, 0);
m_fgrid.SetCols(2)
m_fgrid.SetRows(10)
m_fgrid.SetTextMatrix(0,0,"序号")
m_fgrid.SetTextMatrix(0,1,"姓名")
//加入的代码结束!
return 0;
}
连接正确,然后用ActiveX control test container测试,结果报“Tstcon32执行了非法操
作”错!我百思不得其解,请各路大侠指点!!!
a sample frame control,然后引入控件Microsoft FlexGrid Control,Version 6.0,
包含其头文件,增加一个该类的对象,然后:
int CC1Ctrl::OnCreate(LPCREATESTRUCT lpCreateStruct)
{
if (COleControl::OnCreate(lpCreateStruct) == -1)
return -1;
// TODO: Add your specialized creation code here
//我加入的代码:
m_fgrid.Create(NULL, WS_VISIBLE, CRect(50,50,100,100), this, 0);
m_fgrid.SetCols(2)
m_fgrid.SetRows(10)
m_fgrid.SetTextMatrix(0,0,"序号")
m_fgrid.SetTextMatrix(0,1,"姓名")
//加入的代码结束!
return 0;
}
连接正确,然后用ActiveX control test container测试,结果报“Tstcon32执行了非法操
作”错!我百思不得其解,请各路大侠指点!!!