wantfly

改进软件质量
posts - 8, comments - 2, trackbacks - 0, articles - 0
  博客园 :: 首页 :: 新随笔 :: 联系 :: 订阅 订阅 :: 管理

2011年9月2日

摘要: 用WM_COPYDATA只能传输ANSI编码,用Unicode编码不能收到完整数据。阅读全文

posted @ 2011-09-02 17:45 想飞 阅读(60) 评论(0) 编辑

2011年8月21日

摘要: 金山开源界面BkWin熟悉的后做界面的效果还不错,但它的界面排版的特殊性,使得WTL的DDX(对话框数据交换)没法使用,具体原因是: 金山开源界面BkWin的对话框的所有控件都是用CBkDialogView来排版和管理。 所以WTL中的DDX是接收不到控件的消息阅读全文

posted @ 2011-08-21 13:11 想飞 阅读(201) 评论(0) 编辑

2011年8月19日

摘要: WTL中,CListBox的没有触发LBN_SELCHANGE 的消息。阅读全文

posted @ 2011-08-19 00:10 想飞 阅读(153) 评论(0) 编辑

2011年7月31日

在一个项目使用math库时,编译出现以下错误。

1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(485) : error C2059: 语法错误 : “(”

1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(485) : error C2059: 语法错误 : “-”
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(485) : error C2059: 语法错误 : “)”
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(486) : error C2143: 语法错误 : 缺少“;”(在“{”的前面)
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(486) : error C2447: “{”: 缺少函数标题(是否是老式的形式表?)
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(487) : error C2059: 语法错误 : “(”
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(487) : error C2059: 语法错误 : “-”
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(487) : error C2059: 语法错误 : “)”
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(488) : error C2143: 语法错误 : 缺少“;”(在“{”的前面)
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(488) : error C2447: “{”: 缺少函数标题(是否是老式的形式表?)
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(491) : error C2059: 语法错误 : “(”
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(491) : error C2059: 语法错误 : “-”
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(491) : error C2059: 语法错误 : “)”
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(492) : error C2143: 语法错误 : 缺少“;”(在“{”的前面)
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(492) : error C2447: “{”: 缺少函数标题(是否是老式的形式表?)
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(539) : error C2059: 语法错误 : “(”
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(539) : error C2059: 语法错误 : “-”
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(539) : error C2059: 语法错误 : “)”
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(540) : error C2143: 语法错误 : 缺少“;”(在“{”的前面)
1>c:\program files (x86)\microsoft visual studio 9.0\vc\include\math.h(540) : error C2447: “{”: 缺少函数标题(是否是老式的形式表?)

 

看提示应该是abs函数跟某个宏定义有冲突。但搜遍整个工程也没找到这个宏。 

百思不得其解!

最后在某个动态库的头文件找到这个宏定义。去掉后编译通过。

总结:

1、宏定义函数的一般情况不要定义的跟运行库相同,会引起隐患。

2、VS的搜索功能,如果不指定路径,只搜索整个工程,是没办法搜索到不在工程里,但在CPP文件包括的文件。

 

posted @ 2011-07-31 14:47 想飞 阅读(34) 评论(0) 编辑

2011年7月27日

LVS_SINGLESELCListViewCtrl的风格: 

LVS_ICON: 为每个item显示大图标

LVS_SMALLICON: 为每个item显示小图标

LVS_LIST: 显示一列带有小图标的item

LVS_REPORT: 显示item详细资料

直观的理解:windows资源管理器,“查看”标签下的“大图标,小图标,列表,详细资料” 

应用LVS_REPORT模式:

m_AttachList.Create( this->m_hWND, 
NULL, NULL, 
WS_CLIPCHILDREN | WS_CHILD | LVS_REPORT | LVS_SINGLESEL  , 

0, IDB_HOME_ATTACH_LISTVIEW, NULL); 

应用LVS_ICON模式: 

m_ListIcon.Create( GetViewHWND(), 

NULL, NULL, 
WS_VISIBLE |WS_BORDER| WS_CHILD | LVS_ICON   , 
0, IDC_SELECT_ICON_LIST, NULL);
ATLASSERT(m_pImageList != NULL);
ATLASSERT(m_uNumIcons != 0);
//LVS_REPORT LVS_ICON
LONG lStyle;
lStyle = ::GetWindowLong(m_ListIcon.m_hWnd, GWL_STYLE);  //获取当前窗口类型
lStyle &= ~LVS_TYPEMASK;   //清除显示方式位
lStyle |= LVS_SMALLICON;   //设置显示方式
 
::SetWindowLong(m_ListIcon.m_hWnd, GWL_STYLE, lStyle);  //设置窗口类型
m_uNumIcons = m_pImageList->GetImageCount();
m_ListIcon.SetImageList(m_pImageList->m_hImageList, LVSIL_SMALL);

需要注意的是:LVS_ICON模式需要指定WS_VISIBLE式样,并且不能和

 LVS_SINGLESEL一起用。

同时需要清除显示方式位才能正常显示。

记录于此! 

 

posted @ 2011-07-27 20:41 想飞 阅读(172) 评论(0) 编辑

关于浏览器研究收集的资料

3、浏览器简介-webkit结构

http://blog.csdn.net/yirui/archive/2008/09/03/2872810.aspx 

 

posted @ 2011-07-27 20:28 想飞 阅读(77) 评论(0) 编辑

2010年12月28日

摘要: 1、提供多种格式的图片合并(BMP,JPG,GIF,ICON,PNG等) 2、提供多种合并方式,按行方式,按列方式等 3、提供多行,多列的合并方式 4、各个图片间可以指定间隔 5、装载入的图片可移动到不同的位置 6、方便增加或者减少已经加载的图片 7、提供预览功能 8、适合程序员制作图标资源和需要合并图片的人群/Files/wantfly/MergePic.rar阅读全文

posted @ 2010-12-28 09:49 想飞 阅读(166) 评论(0) 编辑

2008年5月1日

摘要: 本源码是对著名的开源代码CoolPlayer的扩充,其中有些来自于其它的开源代码,一切的版权属原机构或原作者。
在此对原作者致敬!
阅读全文

posted @ 2008-05-01 07:45 想飞 阅读(763) 评论(2) 编辑