摘要:
unitMain;interfaceusesWindows,Messages,SysUtils,Classes,Graphics,Controls,Forms,Dialogs,ActnList,StdCtrls,IdComponent,IdTCPServer,IdHTTPServer,Buttons,ComCtrls,IdGlobal,IdBaseComponent,IdThreadMgr,IdThreadMgrDefault,syncobjs,IdThreadMgrPool,ExtCtrls,IdIntercept,IdSSLOpenSSL,IdIOHandlerSocket,IdServe 阅读全文
摘要:
编译BOOST库bjamstage--toolset=qcc--without-graph--without-graph_parallel--without-math--without-mpi--without-python--without-serialization--without-wave--stagedir="E:\VC\boost_1_47_0\bin\mgw"link=staticruntime-link=sharedruntime-link=staticthreading=multidebugrelease编译选项说明BJAM=""#bo 阅读全文
摘要:
QPixmap*showPixmap=newQPixmap(":/Skin/start.png");showPixmap->mask();QSplashScreen*splash=newQSplashScreen;splash->setPixmap(*showPixmap);splash->show();Sleep(2000);Qt::AlignmenttopRight=Qt::AlignRight|Qt::AlignTop;splash->showMessage(QObject::tr("Settingupthemainwindow... 阅读全文
摘要:
域名解析boost::asio::io_serviceio_service;tcp::resolverresolver(io_service);tcp::resolver::queryquery(tcp::v4(),argv[1],"daytime");tcp::resolver::iteratorendpoint_iterator=resolver.resolve(query);tcp::resolver::iteratorend;tcp::socketsocket(io_service);boost::system::error_codeerror=boost::asi 阅读全文
摘要:
为什么类成员函数不能直接做为回调函数?因为windows中,回调函数都是显式使用CALLBACk修饰符修饰,也就是_stdcall参数传递方式。_stdcall修饰的函数,参数从右至左依次压入堆栈,被调用者负责平衡堆栈。而所有类的成员函数在定义的时候都被隐式(implicit)定义为__thiscall参数传递方式。__thiscall 修饰的函数参数从右至左依次压入堆栈,被调用者负责平衡堆栈。与所有参数传递方式均不相同的一点:成员函数所在类的this指针被存入ecx寄存器(这个特性只针对Intel x86架构)。如何让类成员函数成为回调函数根据第一节对回调函数与类成员函数各自特点的分析。不难 阅读全文