在mfc中使用cmshflexgrid activex控件 [英] using cmshflexgrid activex control in mfc
本文介绍了在mfc中使用cmshflexgrid activex控件的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我正在使用vs2008.我可以从工具箱中获取cmshflexgrid.但是我不知道如何在其中插入值和列名.
在此先感谢
CoderDinesh
I am using vs2008. I can fetch the cmshflexgrid from the toolbox.But i don''t know how to insert values and column names in that.
Thanks in Advance
CoderDinesh
推荐答案
使用class-wizard为此创建一个成员变量,然后您将具有membervariable.SetTextMatrix(row,col,"VAlue");
令m_CtrlGrid为成员变量,然后
如果为了要插入手段
for(int i = 0; i< m_CtrlGrid.GetRows(); i ++)
{
for(int j = 0; j< m_CtrlGird.GetCols(0); j ++)
{
m_CtrlGird.SetTextMatrix(i,j,"Value");
}
}
create an member variable for this using class-wizard then you will have membervariable.SetTextMatrix(row,col,"VAlue");
Let m_CtrlGrid be the member varibale then
if in order you want to insert means
for(int i=0;i<m_CtrlGrid.GetRows();i++)
{
for(int j=0;j<m_CtrlGird.GetCols(0);j++)
{
m_CtrlGird.SetTextMatrix(i,j,"Value");
}
}
这篇关于在mfc中使用cmshflexgrid activex控件的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文