![](https://img-blog.csdnimg.cn/20201014180756919.png?x-oss-process=image/resize,m_fixed,h_64,w_64)
开发积累
tory75034
这个作者很懒,什么都没留下…
展开
-
查找任意多边形的形心
C2DPoint cg_simple( int vcount,C2DPoint polygon[] ){ // 返回值: 形心坐标 double xtr,ytr,wtr,xtl,ytl,wtl; C2DPoint p1,p2,tp; xtr=ytr=wtr=0.0; xtl=ytl=wtl=0.0; for(int i=0;i { p原创 2010-03-22 12:59:00 · 712 阅读 · 0 评论 -
在状态栏动态显示变量的值
在传输图像或者动态监测时,我们经常会需要在状态栏显示比如已监测时间等不断变化的量。1. 在 MainFrame.cpp 中,我们定义全局变量//状态栏宽度static UINT INDICATOR_SEPARATOR = 0;static UINT INDICATOR_1 = 300;static UINT INDICATOR_2 = 150;st原创 2012-02-29 18:55:09 · 343 阅读 · 0 评论 -
error RC1015 : cannot open include file 'afxres.h'
有时在重新安装vc之后会发现以前编译好的程序会出现以下类型的错误:fatal error RC1015: cannot open include file 'afxres.h 'Error spawning cl.exe这些都是由于系统环境变量设置的路径并非现在的vc安装路径所导致的,之前应该在安装VC时选择过写入环境变量的选项,如果原创 2012-02-17 16:13:22 · 682 阅读 · 0 评论 -
error C2275 : illegal use of this type as an expression
今天在使用WinDDK编译驱动时发生错误如下:error C2275 : illegal use of this type as an expression错误行为: int nIndex = 0;似乎很莫名其妙,这样一行定义行怎么会有错误呢?无奈想着改为 : UINT nIndex = 0;错误依旧。发现原驱动代码的变量定义都统一放在函数一开始,而且有一个很原创 2012-02-28 17:15:06 · 469 阅读 · 0 评论 -
CString 比较不相等
有的时候两个 CString 的值是相等的,但是 str1 == str2 却是 Flase ,这是因为 CString 类中 m_pszData 的指针不同引起的,或许其中一个 CString 变量是通过 char 赋值的之类的原因都会导致上述等式不等,可使用 StrCmp(str1,str2) == 0来比较两个CString是否相等。原创 2010-05-13 13:41:00 · 6143 阅读 · 1 评论 -
CMFCPropertySheet使用
消息响应 ON_BN_CLICKED(IDC_CHECK_APPLYPAGE, &CMyPropertySheet::OnApplyPage)也可以用下面的函数:BOOL CMyPropertySheet::OnCommand(WPARAM wParam,LPARAM lParam) { if(LOWORD(wParam)==IDOK)原创 2010-03-22 13:04:00 · 1005 阅读 · 0 评论 -
VC读写文件
void ReadCode(){ CString strPath; ::GetModuleFileName(GetModuleHandle(NULL),strPath.GetBuffer(256),256); strPath.ReleaseBuffer(); int flag=strPath.ReverseFind(//); int size=strPath.GetLength(); s原创 2010-05-13 13:49:00 · 218 阅读 · 0 评论 -
VC修改Access密码
void ModifyDBCode(){ CString strPath; ::GetModuleFileName(GetModuleHandle(NULL),strPath.GetBuffer(256),256); strPath.ReleaseBuffer(); int flag=strPath.ReverseFind(//); int size=strPath.GetLength();原创 2010-05-13 13:47:00 · 598 阅读 · 0 评论 -
VC复制文件、恢复文件
void OnSave(){ CString strPath; ::GetModuleFileName(GetModuleHandle(NULL),strPath.GetBuffer(256),256); strPath.ReleaseBuffer(); int flag=strPath.ReverseFind(//); int size=strPath.GetLength(); strPat原创 2010-05-13 13:51:00 · 827 阅读 · 0 评论 -
VC操作Word
1.实现修改一个表格的对齐方式 和 表格内容的对齐方式 MsWord2007::CParagraphFormat Pf; //格式对象 table2007.Select(); // 选中表格 Pf = m_Selection2007.GetParagraphFormat(); Pf.SetAlignment(0); // 左对齐 MsWord2007::CR原创 2010-04-07 11:15:00 · 892 阅读 · 1 评论 -
LNK1123: 转换到 COFF 期间失败: 文件无效或损坏 && CVT1100: 重复的资源
设置工程属性->配置属性-> 清单工具->输入和输出->嵌入清单,选择[否],确定后重新生成即可。注意:x -> 0x;注意:注解函数的重新选择。原创 2010-03-22 13:08:00 · 279 阅读 · 0 评论 -
inf使用installshield安装的注意
inf 文件使用installshield安装时,需要在inf文件中确定有以下节才可以正常安装[SourceDisksNames]1 = %InstallDisk%,,,[SourceDisksFiles]XxxUSB.sys = 1[Strings]InstallDisk = "Disk1"原创 2012-03-22 11:01:34 · 913 阅读 · 0 评论