- 博客(26)
- 收藏
- 关注
转载 HANDLE的陷阱
用HANDLE定义的变量代表是一个句柄。然而不同的函数,其表示无效的句柄的值却各不相同,需要查询API帮助来确定。 举例: CreateEvent函数用于创建一个event,其返回值类型是HANDLE,但是使用NULL代表无效的返回值。 CreateFile函数用于创建一个指向文件的句柄,其返回值同样是HANDLE,但是使用INVALID_HANDLE_VALUE代表无效的返...
2017-08-14 16:54:00
177
转载 QListView使用自定义的拖放操作
QListView中使用自定义数据类型的拖放操作直接写步骤:子类化QStandardItemModel,创建一个model。model中主要重写了dropMimeData、mimeTypes、supportedDropActions等三个函数。dropMimeData实现了对于接收类型的判断,以及对于接收到的数据的添加;mimeTypes返回一个自定义的数据类型名称;supp...
2017-08-09 15:30:00
793
转载 Supporting Custom Drag Types
Supporting Custom Drag Types http://www.informit.com/articles/article.aspx?p=1405546&seqNum=2转载于:https://www.cnblogs.com/yunhaisoft/p/7325285.html
2017-08-09 14:55:00
141
转载 使用“在静态库中使用 MFC”的静态库
开发工具:visual studio 2013 pro一共是两个项目,一个是A:项目名称MySdk,静态库,多字节,在静态库中使用 MFC,运行库使用“多线程调试 DLL (/MDd)”;另一个是B:可执行程序,多字节,在静态库中使用 MFC,预处理器定义增加_AFXDLL,运行库使用“多线程调试 DLL (/MDd)”。项目A的接口文件中:#ifdef MYSDKINT...
2016-08-07 12:12:00
258
转载 使用Visual Studio 2015开发Qt程序
0、开发环境及工具 操作系统:Windows 7 x64 编译器:Visual Studio 2015 社区版 Qt版本:5.6.0 编程助手:Visual Assist X 2074。1、安装 需要依次安装以下工具:vs2015、Qt 5.6.0 for Windows 32-bit (VS 2015)、Perl。 Qt安装路径:D:\Qt\Qt...
2016-03-31 17:21:00
686
转载 C++的CRC32校验代码
const UINT32 table[] = { 0x00000000, 0x77073096, 0xee0e612c, 0x990951ba, 0x076dc419, 0x706af48f, 0xe963a535, 0x9e6495a3, 0x0edb8832, 0x79dcb8a4, 0xe0d5e91e, 0x97d2d988, 0x09b64c...
2016-02-29 14:20:00
1987
转载 解决一个 undefined reference to `vtable for XXX 问题
今天在使用Qt 的charts时,子类化QChart,正常。然后在头文件中添加Q_OBJECT宏,遇到了如题错误。根据网上的介绍,是因为moc的文件没有添加到makefile中的原因。解决方法挺麻烦。我的解决的方法是直接删除build文件夹,重新构建,问题解决。转载于:https://www.cnblogs.com/yunhaisoft/p/5200449.html...
2016-02-19 11:42:00
255
转载 Qt Quick的Canvas画图之arcTo
函数描述:object arcTo(real x1, real y1, real x2, real y2, real radius)用途:画一段与两个线段相切的圆弧。用法:beginPath();moveTo(x, y);arcTo(x1, y1, x2, y2, radius);strokeStyle = "red";...
2016-02-15 22:47:00
289
转载 CircularGauge等组件源代码的路径
D:\Qt\Qt5.6.0\5.6\Src\qtquickcontrols\src\extras转载于:https://www.cnblogs.com/yunhaisoft/p/5186096.html
2016-02-10 20:11:00
358
转载 在Qt中使用 Qt Chart 5.7.0
如何安装Qt Chart 5.7.0 可以参照这篇博文http://blog.youkuaiyun.com/accelerated1987/article/details/50564312。安装完毕后,新建一个widget项目,然后按照下面的步骤添加组件。1、在pro文件中添加QT += charts。1、在界面使用Qt Creator添加一个QGraphicsView组件...
2016-02-03 17:09:00
222
转载 智慧园的资源
http://www.zhihuishi.com/source/6.html是一个基于神经网络的Visual C++阿拉伯数字训练和识别程序。转载于:https://www.cnblogs.com/yunhaisoft/p/4452968.html
2015-04-24 11:32:00
112
转载 Qt4的项目在转到Qt5时遇到的问题解决方案链接
官方文档:The Transition from Qt 4.x to Qt 5转载于:https://www.cnblogs.com/yunhaisoft/p/4303622.html
2015-02-27 16:32:00
150
转载 禁止MFC的MDI程序自动创建空白子窗体
需要在App类的InitInstance()中添加下面的第三行内容即可: CCommandLineInfo cmdInfo; ParseCommandLine(cmdInfo); cmdInfo.m_nShellCommand = CCommandLineInfo::FileNothing; // 禁止自动创建空白子窗体 // 调度在命令行...
2015-02-27 12:13:00
135
转载 用Delphi写ActiveX的经验
刚刚接手一个项目,源代码是VB,老板要求对这个项目进行一些Bug的修改和功能的扩展。其中,这个程序涉及到了一个9*13的Grid,每个Grid里面需要显示3行指定的信息,并且要能够更改Grid的背景颜色。最要命的,是要能够使用Ctrl键进行多选。 开始的时候,想到了用一个FlexGrid的控件完成任务。但是在搜集了一圈资料后,感觉这个控件比较难用,不容易实现自画功...
2010-01-13 15:42:00
123
转载 如何画MDI主窗体的背景
unitMAIN;interfaceusesWindows,SysUtils,Classes,Graphics,Forms,Controls,Menus,StdCtrls,Dialogs,Buttons,Messages,ExtCtrls,ComCtrls,StdActns,ActnList,ToolWin,ImgList;typeTMainF...
2009-06-01 10:54:00
128
转载 About ShareMem
在用引用了ShareMem创建的动态链接库的时候,主程序也必须包含ShareMem的引用,并且要放在第一个位置。 切记切记!转载于:https://www.cnblogs.com/yunhaisoft/archive/2009/05/19/1460001.html...
2009-05-19 10:43:00
119
转载 Speed up the display of Delphi list components
If you use a Delphi component like a ListBox, Memo, TreeList, ListView,... and you add or modify a lot of items (lines, nodes,...), the component's performance becomes very slow. This is due to t...
2009-05-07 16:16:00
106
转载 How can I determine the names of the installed comm ports?
The following example demonstrates enumerating the communications ports that are installed and listed in the Win32 registry. usesRegistry;procedureTForm1.Button1Click(Sender:TObject)...
2009-05-07 16:12:00
83
转载 How can I delete the row in TStringGrid component?
From: http://www.delphi3000.com/articles/article_819.asp?SK=If you worked with TStringGrid component, then you saw that in this component the Borland developers not provided the method for row ...
2009-05-07 15:31:00
136
转载 Edit Control Styles
To create an edit control using the or function, specify the EDIT class, appropriate window style constants, and a combination of the following edit control styles. After the control has been c...
2009-04-02 09:56:00
204
转载 怎样在InstallShield的Basic MSI Project中用InstallScript添加路径
步骤如下:1、在Installation Designer中点击左栏的【Behavior and Logic】-【InstallScript】标签展开,然后在右边的【Files】上点右键,选择【New Script Files】,生成一个Setup.rul文件。在文件中添加如下语句:#include"ifx.h"exportprototypemyAddAPath...
2009-04-01 13:41:00
327
转载 Delphi 中用 GetEnvironmentVariable 获取常用系统变量
//譬如WINDIR是表示系统目录的系统变量,可以这样获取:vars:string;begins:=GetEnvironmentVariable('WINDIR');ShowMessage(s);{C:\WINDOWS}end;(*--------------------------------------------------...
2009-04-01 13:16:00
279
转载 如何在工具栏或者其他的控件上显示其他控件的Hint
TControl.Hint PropertyUse the Hint property to provide a string of help text either as a Help Hint, or as help text on a particular location such as a status bar.A Help Hint is a box containi...
2008-07-10 09:34:00
139
转载 如何让CoolBar控件的Bands在同一行上
1、在Coolbar上面放置两个Toolbar控件,控件默认是分成两行排列;2、设置第二个Band的Break属性为True,这时两个Bands会排列成一行。转载于:https://www.cnblogs.com/yunhaisoft/archive/2008/07/10/1239705.html...
2008-07-10 09:31:00
186
转载 让控件的DropdownMenu或者PopupMenu弹出来
procedureTMainFrm.ToolButton6Click(Sender:TObject);varMemuPos:TPoint;beginMemuPos:=TToolButton(Sender).ClientToScreen(Point(0,0));MemuPos.y:=MemuPos.y+TToolButton(S...
2008-07-10 09:26:00
157
转载 VC调用Delphi制作的动态链接库如何互相传递字符串
1、VC to DelphiDelphi源程序:libraryExportChartData;usesSysUtils,Classes;{$R*.res}constDLL_VER:Word=$0001;functionGetVer:Word;beginResult:=...
2008-07-10 09:17:00
239
空空如也
空空如也
TA创建的收藏夹 TA关注的收藏夹
TA关注的人