正文

CGridCtrl在VS2008下的使用问题2009-09-21 11:30:00

【评论】 【打印】 【字体: 】 本文链接:http://blog.pfan.cn/yuqiexing/47914.html

分享到:

VC的控件里面是有GridCtrl的,我为了找到扩展性强的,在codeproject上随便下了个控件玩一玩,但是发现VC下CGridCtrl用的好好的,为什么到了VS2008下就用不了了呢?只要一创建就会报错,到底是哪里出了问题?

 

查看了资料,看看国外友人的解决办法:

 

I had the following problem with the 2.26 version.

I build an application with VS2008 and 2.26 gridctrl.
When i wanted to run the program on an XP box, the grid did not display correct.
There was no text, and the columns where very big.

I found in this message area a remark.
So i change CGridDefaultCell::CGridDefaultCell()

changed :
ncm.cbSize = sizeof(NONCLIENTMETRICS);
into :
ncm.cbSize = sizeof(NONCLIENTMETRICS) - sizeof(ncm.iPaddedBorderWidth);

After this things worked. Smile

I think this is a bug.

参考资料:

1、http://www.cppblog.com/jerysun0818/archive/2007/05/08/8965.html

2、http://69.10.233.10/KB/miscctrl/gridctrl.aspx

阅读(5257) | 评论(0)


版权声明:编程爱好者网站为此博客服务提供商,如本文牵涉到版权问题,编程爱好者网站不承担相关责任,如有版权问题请直接与本文作者联系解决。谢谢!

评论

暂无评论
您需要登录后才能评论,请 登录 或者 注册