VC
txwtech笛克电科
like C++/QT/OpenCV/C#/
cdtxw@foxmail.com
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
VC++ ALT+F8用于大括号对齐,非常有用
VC++ ALT+F8用于大括号对齐,非常有用原创 2015-03-04 22:50:37 · 1196 阅读 · 3 评论 -
error MSB8020: The build tools for v141
Error 1 error MSB8020: The build tools for v141 (Platform Toolset = 'v141') cannot be found. To build using the v141 build tools, please install v141 build tools. Alternatively, you may upgrade...原创 2018-11-15 14:35:23 · 6756 阅读 · 2 评论 -
LNK2001 无法解析的外部符号 vc2015
严重性 代码 说明 项目 文件 行 禁止显示状态错误 LNK2001 无法解析的外部符号 "public: void __thiscall Dialog_Home::OnBnClickedButton5(void)" (?OnBnClickedButton5@Dialog_Home@@QAEXXZ) SeriPortSend D:\我的...原创 2019-01-02 22:05:35 · 2413 阅读 · 0 评论 -
(MFC中子窗口调用父窗口指针(子类调用父类))VS2015-MFC 引发了异常 读取访问权限冲突
如果按照如下方法:(MFC中子窗口调用父窗口指针(子类调用父类))引发了异常 读取访问权限冲突,见底部解决方法。///////////////////////////////////////////////////////////////////////////////一、创建子窗口二、子窗口调用父窗口指针的函数代码CMFCDlg *pDlg = (CMFCDlg*)this-...原创 2019-01-08 22:26:56 · 2356 阅读 · 0 评论 -
MFC工作者线程和用户界面线程
MFC中有两类线程,分别称之为工作者线程和用户界面线程。二者的主要区别在于工作者线程没有消息循环,而用户界面线程有自己的消息队列和消息循环。 工作者线程没有消息机制,通常用来执行后台计算和维护任务,如冗长的计算过程,打印机的后台打印等。用户界面线程一般用于处理独立于其他线程执行之外的用户输入,响应用户及系统所产生的事件和消息等。但对于Win32的API编程而言,这两种线程是没有区别的,它们...原创 2019-03-14 09:35:19 · 3667 阅读 · 0 评论 -
MFC使用sleep函数注意事项
MFC使用sleep函数注意事项原创 2019-03-14 10:44:14 · 9071 阅读 · 3 评论 -
occcont.cpp line 925运行错误 Debug Assertion Failed
occcont.cpp line 925运行错误 Debug Assertion Failed:表示缺少某个OCX控件。参考方法:https://jingyan.baidu.com/article/cdddd41cab6f6453cb00e1fc.htmlhttps://blog.csdn.net/cqfdcw/article/details/78757618?utm_source=b...转载 2019-03-10 22:11:52 · 9377 阅读 · 5 评论 -
LNK1123: 转换到 COFF 期间失败: 文件无效或损坏
复制 C:\Windows\winsxs\x86_netfx-cvtres_for_vc_and_vb_b03f5f7f11d50a3a_6.1.7601.17514_none_ba1c770af0b2031b 目录下的 cvtres.exe 到安装目录不一样,根据安装目录,如:C:\Program Files\Microsoft Visual Studio 10.0\VC\bin ...原创 2019-03-25 09:45:03 · 335 阅读 · 0 评论 -
MFC多线程临界区对象实现线程同步范例
MFC多线程临界区对象实现线程同步范例// vs23_5_5.cpp : 定义控制台应用程序的入口点。//txwtech 2019/03/26 vs2010平台#include "stdafx.h"#include "windows.h"DWORD WINAPI ThreadProc1(LPVOID lpParam);DWORD WINAPI ThreadProc2(LPVOID...原创 2019-03-26 10:33:53 · 697 阅读 · 0 评论 -
MFC信号量对象实现多线程范例
MFC信号量对象实现多线程范例// vs23_5_7.cpp : 定义控制台应用程序的入口点。//txwtech vs2010#include "stdafx.h"#include "windows.h"DWORD WINAPI ThreadProc1(LPVOID lpParam);DWORD WINAPI ThreadProc2(LPVOID lpParam);...原创 2019-03-26 11:23:19 · 542 阅读 · 0 评论 -
MFC互斥对象实现多线程同步实例
MFC互斥对象实现多线程同步实例// vs23_5_9.cpp : 定义控制台应用程序的入口点。//txwtech#include "stdafx.h"#include "windows.h"DWORD WINAPI ThreadProc1(LPVOID lpParam);DWORD WINAPI ThreadProc2(LPVOID lpParam);int iGolbalC...原创 2019-03-26 11:53:04 · 909 阅读 · 0 评论 -
0x778d6d79 处有未经处理的异常: 0xC0000005: 写入位置 0x00000014 时发生访问冲突
multi_thread_example.exe 中的 0x778d6d79 处有未经处理的异常: 0xC0000005: 写入位置 0x00000014 时发生访问冲突//MFC,单文档实现临界区线程同步时,请在MainFram.cpp的构造函数里面初始化。int CThreadSend::Run(void){//return 0;while (bRun){En...原创 2019-03-27 16:57:12 · 3798 阅读 · 0 评论 -
Run-Time Check Failure #2 - Stack around the variable was corrupte问题处理
Run-Time Check Failure #2 - Stack around the variable was corrupte问题处理VS编译的过程中,报上面的错误,一般来说都是内存越界。 把 project->配置属性->c/c++->代码生成->基本运行时检查 为 默认值 就不会报本异常。如果改为其他就有exception。 解...转载 2019-04-18 18:50:02 · 1780 阅读 · 1 评论 -
error C2039: 'GetCurSel' : is not a member of 'CString'
error C2039: 'GetCurSel' : is not a member of 'CString', m_Combo组合框的类型应该选control.原创 2016-03-26 01:32:50 · 1654 阅读 · 0 评论 -
ado abnormal program termination
读取数据是,ado abnormal program termination报错确保数据库mdb里面的值没有空的,都必须填满或者用0补充。原创 2016-03-26 01:21:44 · 1063 阅读 · 0 评论 -
ADO几种数据库连接方式
(1)通过JET数据库引擎对ACCESS2000数据库的连接 m_pConnection->Open("Provider=Microsoft.Jet.OLEDB.4.0;Data Source=C:\\DataBase.mdb","","",adModeUnknown); (2)通过DSN数据源对任何支持ODBC的数据库进行连接:原创 2016-03-15 19:59:21 · 1056 阅读 · 0 评论 -
error C2146: syntax error : missing ';' before identifier 'lpMenu'
error C2146: syntax error : missing ';' before identifier 'lpMenu'创建类的位置是很有讲究的,如果要使用CMenuItemContext类定义成员变量,则这个类需要放在CMyCoolMenu类之前。class CMyCoolMenu:public CMenu {public: CMyCoolMenu();...原创 2016-03-29 19:34:28 · 1099 阅读 · 0 评论 -
Cannot find the definition (implementation) of this function
解决方法:先保存下工程,关闭VC6.0。然后打开工程文件夹,将后缀名为 .ncb 文件删掉。原创 2016-03-29 20:15:58 · 942 阅读 · 0 评论 -
error C2065: 'Public_Area' : undeclared identifier
error C2065: 'Public_Area' : undeclared identifier需要再头文件中定义;#ifndef Public_Area#define Public_Area 20 //×ó±ß»ÒÉ«ÇøÓò¿í¶È#endif原创 2016-03-29 22:53:44 · 857 阅读 · 0 评论 -
VC如何制作用IC卡读卡器读取系统
VC如何制作用IC卡读卡器读取系统大型会议签到系统运动会签到系统记录出勤率原创 2016-04-01 21:03:20 · 2067 阅读 · 0 评论 -
error C2664: 'atof' : cannot convert parameter 1 from 'int' to 'const char *'
double ff=atof(b); error C2664: 'atof' : cannot convert parameter 1 from 'int' to 'const char *'不能把int转换为字符型,因为vc中atof是把字符型转换成数值型。 atof(b)括号里面的b是整型数据。原创 2016-04-01 22:21:49 · 8877 阅读 · 0 评论 -
Selected collating sequence not supported by the operating system vc6.0报错
vc6.0中创建exe操作数据库,在英文系统下面运行报错。Selected collating sequence not supported by the operating system 主要原因是公司用的是英文操作系统英文版OS。我建的数据库是中文系统下生成的,而根据微软(Microsoft)的官方网站说明:若Access在一种语言下创建,而在另一种语言下使用就会提示这种错误。原创 2016-03-21 19:26:11 · 747 阅读 · 0 评论 -
LINK : fatal error LNK1104: cannot open file "mfc42.lib"
LINK : fatal error LNK1104: cannot open file "mfc42.lib"Error executing link.exe.所以着重查一下Tools(工具)菜单中Options(选项)对话框中的Directories(目录)-show directories for:library files中的包括文件的路径是否正确,是否在VC的安装路径中,原创 2016-03-22 22:07:58 · 1586 阅读 · 1 评论 -
vc 中各种类型的数据相互转换
字符型转双精度型: double atof( const char *string );用法:CString str;char *aa=(char*)str.GetBuffer(str.GetLength());double bb=atof(aa);字符型转整型 int atoi( const char *strin...原创 2016-04-04 09:41:34 · 1102 阅读 · 0 评论 -
mdb数据转换成excel、导入导出方法
mdb数据转换成excel方法原创 2016-03-24 09:05:10 · 22704 阅读 · 0 评论 -
VC6.0 点击按钮添加ado数据到数据库总是失败
VC6.0 点击按钮添加数据到数据库总是失败:确保数据库里面的数据类型要一直,如文本框是字符串,数据库里面设置的类型是数字。(用access 打开mdb里面设置)原创 2016-03-23 22:40:55 · 708 阅读 · 0 评论 -
warning C4551: function call missing argument list 问题
warning C4551: function call missing argument list 问题m_Ado.CloseConn(); 函数少了后面的括号就会报警。原创 2016-03-24 23:04:31 · 8330 阅读 · 0 评论 -
Visual C++ POSITION用法解释,POSITION是什么?
POSITION是MFC模板类库中经常使用的一个数据类型,我们从它的定义可以看出,其实,它就是一个指针。// abstract iteration positionstruct __POSITION { };typedef __POSITION* POSITION;MFC给出的注释是:一个抽象的迭代位置,既然是抽象,也就是没有给定具体的数据类型,以满足不同的模板参数的需要。在C...转载 2019-05-02 21:38:24 · 4545 阅读 · 0 评论
分享