`
mylove2060
  • 浏览: 331948 次
  • 性别: Icon_minigender_1
  • 来自: 杭州
社区版块
存档分类
最新评论
文章列表
QTableWidgetItem *qItem = new QTableWidgetItem( tableLine[i].c_str() ); qItem->setFlags( qItem->flags() & (~Qt::ItemIsEditable & ~Qt::ItemIsSelectable) );//不可编辑,不可选,
setSelectionBehavior(QAbstractItemView::SelectRows); //记录可选择 setSelectionMode(SingleSelection); // 记录只能单选择,一条记录highlight setFocusPolicy(Qt::NoFocus); //鼠标不可以获取焦点
Author:QQ174554431 一个word文件和一个工程文件,案例。
一般编译dll工程时会生成lib和exp文件 编译exe工程同样可以生成以上两文件。 __declspec(dllexport) 以Test.exe 为例 编译时有以下信息 1>   Creating library C:\Documents and Settings\Administrator\My Documents\Visual Studio 2005\Projects\Test3\Debug\Test3.lib and object C:\Documents and Settings\Administrator\My Documents\Visual Studio 200 ...
QLabel *userLabel = new QLabel(tr("Username:")); userLabel->setFrameStyle(QFrame::Panel | QFrame::Sunken); 效果:
struct ltstr { bool operator()(const char* s1, const char* s2) const { return strcmp(s1, s2) < 0; } }; int main() { map<const char*, int, ltstr> months; months["january"] = 31; months["february"] = 28; months["march"] = 31; ...
通过模板生成set get 方法减少代码量。 #include "stdafx.h" #include <iostream> #include <string> #define SETGET_DATA( I )\ void Set_##I( const std::string& in_##I )\ {\ if (in_##I.length() > sizeof( m_##I ) )\ {\ return;\ }\ strcpy( m_##I , in_##I.c_str() );\ }\ con ...
字符串制定位数截取,模板类。 template <int LENGTH> class MapKey { public: MapKey() { m_key[0] = 0; } MapKey( const std::string& in_key ) { strncpy ( m_key, in_key.c_str(), LENGTH ); m_key [LENGTH ] = 0; if ( in_key.length() > LENGTH ) { std::cout<<"error&q ...
调用test6.exe 为例,通过客户端调用没有闪烁。 #include "windows.h" #include <string> std::string fullCommandLine = "\"C:\\Documents and Settings\\kevin.chen\\My Documents\\Visual Studio 2005\\Projects\\Test6\\debug\\test6.exe \""; STARTUPINFOA startupInfo; PROCESS_INFORM ...
assert()是C语言标准库中提供的一个通用预处理器宏在代码中常利用assert()来判断一个必需的前提条件以便程序能够正确执行 #include <iostream> #include "assert.h" int _tmain(int argc, _TCHAR* argv[]) { int i = 0; for (i=1; i<100; i++) { assert(i!=5); //stop when i = 5 std::cout<<i<<std::endl; } re ...
#include "stdafx.h" #include <iostream> int _tmain(int argc, _TCHAR* argv[]) { char array1[5] = "aaaa"; memset(array1,'\0',5); // std::cout<<array1<<std::endl; //0 0 0 0 0 char array2[5] = "aaaa"; memset(array2,'b',4); std::cout< ...
HomeLibraryLearnDownloadsSupportCommunity Sign in |United States - English |Preferences MSDN Library Windows Development System Services Interprocess Communications Pipes Using Pipes Named Pipe Server Using Overlappe… Community Content free resource of pipe The sample code forgot to releas... Cor ...
C++和C#进程之间通过命名管道通信(上) “命名管道”是一种简单的进程间通信(IPC)机制。命名管道可在同一台计算机的不同进程之间,或在跨越一个网络的不同计算机的不同进程之间,支持可靠的、单向或双向的数据通信。用命名管道来设计应用程序实际非常简单,并不需要事先深入掌握基层网络传送协议(如TCP/IP或IPX)的知识。因为命名管道利用了微软网络提供者(MSNP)重定向器,通过一个网络,在各进程间建立通信。这样一来,应用程序便不必关心网络协议的细节。 命令管道是围绕Windows文件系统设计的一种机制,采用“命名管道文件系统”(NamedPipeFileSystem,NPFS)接口。因此 ...
The ZeroMemory function fills a block of memory with zeros. ZeroMemory 函数可以把一块内存用'0’填充掉。 void ZeroMemory( PVOID Destination, SIZE_T Length ); 如:char k[100]; ZEROMEMORY( K , sizeof(k)); 和 SECUREZEROMEMORY 用法很接近 只是 后者比较安全性比较高 #include "stdafx.h" #include <string> #include < ...
Author:QQ174554431 TestTimeJoin.h #pragma once #include <iostream> #include <boost/thread/thread.hpp> #include <boost/bind.hpp> class TestTimeJoin { public: TestTimeJoin(void); ~TestTimeJoin(void); void Running(); void StartingThead(); private: boost::thread ...
Global site tag (gtag.js) - Google Analytics