MFC的GridControl只能创建一次怎么解决?
调用第三方控件的GridControl,已编译成DLL调用,可是说明上CreateFromStatic函数说只能走一次,现在需要能多走几次,网搜后感觉有点像是因为调用约定...
调用第三方控件的GridControl,已编译成DLL调用,可是说明上CreateFromStatic函数说只能走一次,现在需要能多走几次,网搜后感觉有点像是因为调用约定不一样,我调试的时候走到CreateFromStatic这个函数时都还没走进去就报错,错误提示
求大神指教!!
实际语句:
CRealGrid listTestPoint;
listTestPoint.SetRowColCount(30, 16, 1, 1);
listTestPoint.CreateFromStatic(this, IDC_LIST1);
m_Pen = CreatePen(PS_SOLID, 0, RGB(192,192,192));
listTestPoint.SetDefaultPen(m_Pen);
这个CRealGrid类是这样声明的
class REALGRID_API CRealGrid : public CWnd
{
DECLARE_DYNAMIC(CRealGrid)
DECLARE_MESSAGE_MAP()
public:
CRealGrid();
virtual ~CRealGrid();
void SetRowColCount(int rowCount, int colCount, int fixedRowCount, int fixedColCount);
BOOL CreateFromStatic(CWnd* pwndParent, UINT wID, BOOL hasClientEdge=TRUE);
BOOL CreateDirect(CWnd* pwndParent, UINT wID, const RECT& rect, BOOL hasClientEdge=TRUE);
}; 展开
求大神指教!!
实际语句:
CRealGrid listTestPoint;
listTestPoint.SetRowColCount(30, 16, 1, 1);
listTestPoint.CreateFromStatic(this, IDC_LIST1);
m_Pen = CreatePen(PS_SOLID, 0, RGB(192,192,192));
listTestPoint.SetDefaultPen(m_Pen);
这个CRealGrid类是这样声明的
class REALGRID_API CRealGrid : public CWnd
{
DECLARE_DYNAMIC(CRealGrid)
DECLARE_MESSAGE_MAP()
public:
CRealGrid();
virtual ~CRealGrid();
void SetRowColCount(int rowCount, int colCount, int fixedRowCount, int fixedColCount);
BOOL CreateFromStatic(CWnd* pwndParent, UINT wID, BOOL hasClientEdge=TRUE);
BOOL CreateDirect(CWnd* pwndParent, UINT wID, const RECT& rect, BOOL hasClientEdge=TRUE);
}; 展开
1个回答
推荐律师服务:
若未解决您的问题,请您详细描述您的问题,通过百度律临进行免费专业咨询