一、基本对话框 1,核心库: 界面程序 QApplication 非程序界面QCoreAppliction 2,消息循环必须执行QApplication.exec(); 3,消息绑定机制: 信号-槽 信号可以对应信号,也可以对应槽。 一个信号可以对应多个信号和多个槽。 4,QT基本对话框: QErr Read More
posted @ 2016-10-27 23:45 findumars Views(1678) Comments(0) Diggs(0)
使用QScrollArea可以帮助我们实现让一个widget的内容带有滚动条,用户可以通过拖动滚动条来查看更多内容, 代码示例如下: 1.带有滚动条的widget列表 2.带有滚动条的图片显示 http://blog.chinaunix.net/uid-25749806-id-337219.html Read More
posted @ 2016-10-27 23:42 findumars Views(1645) Comments(0) Diggs(0)
一、下载Qt源码包到本机,然后解压缩#tar zxvf qt-x11-opensource-src-4.3.2.tar.gz -C /usr/local //将qt-x11-opensource-src-4.2.3.tar.gz源码包解压缩到/usr/local目录(推荐解压缩至 /usr/loca Read More
posted @ 2016-10-27 23:39 findumars Views(8944) Comments(2) Diggs(0)
之前,用标准C++写过读取文件夹。现在用QT重写代码,顺便看了下QT如何实现,还是相当简单的。主要用到QDir,详细文档可见这里 A program that lists all the files in the current directory (excluding symbolic links Read More
posted @ 2016-10-27 23:34 findumars Views(22589) Comments(0) Diggs(0)
http://download.csdn.net/user/VisualEleven Read More
posted @ 2016-10-27 23:19 findumars Views(850) Comments(0) Diggs(0)
Qt键盘事件属于Qt事件系统,所以事件系统中所有规则对按键事件都有效。下面关注点在按键特有的部分: 一个拥有焦点(focus)的QWidget才可以接受键盘事件。有输入焦点的窗口是活动窗口或活动窗口子窗口或子子窗口等。 焦点移动的方式有以下几种: 按下Tab或Shift+Tab 注意:文本编译器(一 Read More
posted @ 2016-10-27 23:18 findumars Views(42265) Comments(0) Diggs(1)
[cpp] view plain copy [cpp] view plain copy // 模拟登陆115网盘 #include <afxinet.h> // 包含相关的头文件 /* 用抓包工具抓包可得到需要提交的数据,然后模拟提交即可。 *(有的时候需要得到cookie信息,你可以使用CInte Read More
posted @ 2016-10-27 23:11 findumars Views(309) Comments(0) Diggs(0)
http://blog.csdn.net/visualeleven/article/details/6041893 http://blog.csdn.net/visualeleven/article/details/6088590 http://blog.csdn.net/visualeleven/ Read More
posted @ 2016-10-27 23:09 findumars Views(203) Comments(0) Diggs(0)
[cpp] view plain copy BOOL SaveHwndToBmpFile(HWND hWnd, LPCTSTR lpszPath) { HWND hDesktop = ::GetDesktopWindow(); ASSERT(hDesktop); if(NULL == hWnd) { Read More
posted @ 2016-10-27 22:08 findumars Views(1161) Comments(1) Diggs(0)
net user administrator /active:yes runas /user:ComputerName\Administrator /savecred “C:\Path\To\Program.exe“runas /user:Laptop\Administrator /savecred Read More
posted @ 2016-10-27 22:06 findumars Views(599) Comments(0) Diggs(0)
[cpp] view plain copy // CXProgressCtrl 头文件 #pragma once // CXProgressCtrl class CXProgressCtrl : public CProgressCtrl { DECLARE_DYNAMIC(CXProgressCtr Read More
posted @ 2016-10-27 21:30 findumars Views(1369) Comments(0) Diggs(0)
版权声明:本文为博主原创文章,未经博主允许不得转载。 版权声明:本文为博主原创文章,未经博主允许不得转载。 [cpp] view plain copy // MFC 版本 CEdit* pEdit = GetDlgItem(IDC_EDIT1); ASSERT(pEdit && pEdit->Get Read More
posted @ 2016-10-27 21:15 findumars Views(1972) Comments(0) Diggs(0)
[cpp] view plain copy CStatusBar m_StatusBar; // 成员变量 // 全局变量 static UINT auIDStatusBar[] = { ID_SEPARATOR }; //在对话框类的WM_CREATE消息的响应函数OnCreate中加入下面的代码 Read More
posted @ 2016-10-27 21:12 findumars Views(612) Comments(0) Diggs(0)
之前写过一个自绘的CListBox类,详细请参考http://blog.csdn.net/VisualEleven/archive/2010/10/12/5935430.aspx现在修改这之前的代码,使该CListBox能够支持多行显示的问题。 [cpp] view plain copy // 重写 Read More
posted @ 2016-10-27 21:09 findumars Views(507) Comments(0) Diggs(0)
QT visual stuido 集成插件不能打开ui文件的解决方法 visual studio里不能打开这个ui文件,出现warning等解决方法是:于是将<?xml version="1.0" encoding="UTF-8"?>从ui文件里去除这一句,果然,又可以从visual studio里 Read More
posted @ 2016-10-27 20:59 findumars Views(771) Comments(0) Diggs(0)
360关停公告出来后, 我几乎吧国内知名的云盘都装了一遍, 百度,联想,亿方云, 够快,天翼....就异地协作办公来说, 360的体验完爆他们, 不管是不是付费, 顺便说下, 上面的几款产品, 天翼最差, 毕竟对央企运营商做互联网服务, 不能期望太高. 不然前有飞信, 后有易信, 也微信啥事了 同理 Read More
posted @ 2016-10-27 20:52 findumars Views(1137) Comments(0) Diggs(0)
void QApplication::alert(QWidget * widget, int msec = 0)如果窗口不是活动窗口,则会向窗口显示一个警告。警报会显示msec 毫秒。如果毫秒为零,闪烁一段时间后会停止,任务栏图标会一直亮着。widget.h #ifndef WIDGET_H #de Read More
posted @ 2016-10-27 20:37 findumars Views(844) Comments(0) Diggs(0)
wchar_t * sourcepath=new wchar_t[MAX_PATH];int s1=str.toWCharArray(sourcepath); sourcepath[s1]=0; Read More
posted @ 2016-10-27 20:36 findumars Views(1078) Comments(0) Diggs(0)
https://msdn.microsoft.com/en-us/library/windows/desktop/bb736357(v=vs.85).aspx Read More
posted @ 2016-10-27 20:14 findumars Views(541) Comments(0) Diggs(0)
1.设置Windows最低版本要求 [Setup]: MinVersion 格式: a.bb,c.dd,这里 a.bb 是 Windows 版本,c.dd 是 Windows NT 版本。 默认值: 4.0,4.0 描述:这个指令让你指定你的软件运行必须的 Windows 或 Windows NT Read More
posted @ 2016-10-27 18:05 findumars Views(1838) Comments(0) Diggs(0)
在多线程下面,有时候会希望等待某一线程完成了再继续做其他事情,要实现这个目的,可以使用Windows API函数WaitForSingleObject,或者WaitForMultipleObjects。这两个函数都会等待Object被标为有信号(signaled)时才返回的。那么,什么是信号呢?简单 Read More
posted @ 2016-10-27 16:27 findumars Views(2339) Comments(0) Diggs(0)
Qt中实现单例模式(SingleTon) 单例模式分为“饥汉”和“饿汉”两种版本,也正是线程安全问题使得原本简单的单例模式变得复杂。由于单例模式很常用,Boost库中有强大的泛型单例实现,我也利用Qt的原子指针QAtomicPointer来实现Qt中的单例模式: //.cppclass Single Read More
posted @ 2016-10-27 16:01 findumars Views(3374) Comments(0) Diggs(0)
http://blog.csdn.net/goforwardtostep/article/details/60884870 http://blog.csdn.net/goforwardtostep/article/details/64169734 http://blog.csdn.net/gofor Read More
posted @ 2016-10-27 06:25 findumars Views(1666) Comments(0) Diggs(0)
360你可以收费,但是别说关就关啊,什么监管涉黄爆,你以为就你一家网盘吗,百度黄爆不比你少,别人怎么还能搞。这是什么借口。真的,你要是烧不起了可以收费,我在115都买了几年的vip券了。我相信很多人都愿意花钱。你不免费也比现在这样强啊。有一次我硬盘坏了,买了个新硬盘,想在新硬盘上用360同步盘把文件 Read More
posted @ 2016-10-27 05:51 findumars Views(478) Comments(0) Diggs(0)
CreateProcessAsUser 怎么会还需要密码呢~~~先WTSGetActiveConsoleSessionId 得到当前的处理激活状态的SessionIdOpenProcessToken 得到服务进程的TOKENDuplicateTokenEx 复制一个TOKENSetTokenInfo Read More
posted @ 2016-10-27 00:32 findumars Views(4399) Comments(0) Diggs(0)
[cpp] view plain copy // 将exe作为资源加入,然后再释放出来,并运行 try { HRSRC hRes = FindResource(NULL, MAKEINTRESOURCE(IDR_EXE1), _T("EXE")); if(NULL == hRes) return ; Read More
posted @ 2016-10-27 00:19 findumars Views(889) Comments(0) Diggs(0)
版权声明:本文为博主原创文章,未经博主允许不得转载。 版权声明:本文为博主原创文章,未经博主允许不得转载。 [cpp] view plain copy BOOL ExecuteAsUser(LPCWSTR lpszUserName, LPCWSTR lpszPassword, LPCWSTR lps Read More
posted @ 2016-10-27 00:19 findumars Views(758) Comments(0) Diggs(0)
[cpp] view plain copy HDESK hDesk = CreateDesktop(_T("MyDesk"), NULL, NULL, 0, GENERIC_ALL, NULL); ASSERT(hDesk); STARTUPINFO si = {sizeof(si)}; si.lp Read More
posted @ 2016-10-27 00:17 findumars Views(2807) Comments(0) Diggs(0)
对于模态非模态对话框默认是不响应菜单的UPDATE_COMMAND_UI消息的,需要增加对WM_INITMENUPOPUP消息的处理以后,才可以响应UPDATE_COMMAND_UI。 [cpp] view plain copy void CXXXDlg::OnInitMenuPopup(CMenu Read More
posted @ 2016-10-27 00:15 findumars Views(603) Comments(0) Diggs(0)
在GUI程序中使用printf函数: [cpp] view plain copy #include <io.h> #include <fcntl.h> void InitConsole() { int nRet= 0; FILE* fp; AllocConsole(); nRet= _open_os Read More
posted @ 2016-10-27 00:13 findumars Views(2346) Comments(0) Diggs(0)
替换应用程序exe图标,主要使用的API函数是BeginUpdateResource(),UpdateResource(),EndUpdateResource()来使用自定义的ico文件类替换exe程序原来的图标。 [cpp] view plain copy // 第一个参数是将要替换图标的exe文 Read More
posted @ 2016-10-27 00:11 findumars Views(3734) Comments(0) Diggs(0)
[cpp] view plain copy //自绘CListCtrl类,重载虚函数DrawItem void CNewListCtrl::DrawItem(LPDRAWITEMSTRUCT lpDrawItemStruct) { // TODO: Add your code to draw the Read More
posted @ 2016-10-27 00:10 findumars Views(3366) Comments(0) Diggs(0)
[cpp] view plain copy [cpp] view plain copy //例如CNewListBox继承自CListBox,重载虚MeasureItem和DrawItem这两个虚函数,代码如下: void CNewListBox::DrawItem(LPDRAWITEMSTRUCT Read More
posted @ 2016-10-27 00:10 findumars Views(2620) Comments(0) Diggs(0)
版权声明:本文为博主原创文章,未经博主允许不得转载。 版权声明:本文为博主原创文章,未经博主允许不得转载。 [cpp] view plain copy //在CMainFrame类的PreCreateWindow函数中加入 m_strTitle = _T("Hello"); cs.style &=  Read More
posted @ 2016-10-27 00:09 findumars Views(349) Comments(0) Diggs(0)
[cpp] view plain copy [cpp] view plain copy http://blog.csdn.net/visualeleven/article/details/7286517 Read More
posted @ 2016-10-27 00:07 findumars Views(912) Comments(0) Diggs(0)
[cpp] view plain copy [cpp] view plain copy http://blog.csdn.net/visualeleven/article/details/7211249 Read More
posted @ 2016-10-27 00:06 findumars Views(1146) Comments(0) Diggs(0)
[cpp] view plain copy // 派生自CButton类,主要过滤WM_LBUTTONDOWN 、WM_LBUTTONUP和WM_MOUSEMOVE消息。 BOOL m_bFlag = FALSE; // 成员变量,用来标示鼠标是否按下, 初始化为FALSE CPoint m_pt; Read More
posted @ 2016-10-27 00:05 findumars Views(505) Comments(0) Diggs(0)