all Vc article that need to read.
摘要:1:write cpp or c style func head: #define USECPP #include "comNet.h" //use put and get file. //because comNet are "c"#pragma comment(lib,"Ws2_32.lib") #define BUFSIZE 100#define MAX_CMD_FILE_NAME_...
阅读全文
摘要:put class into dll is one of the questions that make me trouble utill one daywhen I see 's first chapter, I get the result.and tried in dos cmd and also VC6.B:by hand in dos.1:write TestCC.h#ifdef IM...
阅读全文
摘要:put class into dll is one of the questions that make me trouble utill one daywhen I see 's first chapter, I get the result.and tried in dos cmd and also VC6.A:VC61:add a class likestudent.hclass _dec...
阅读全文
摘要:This problem is important when we want create a NOTEBOOK like Microsoft,some times we must use this teck to use as logs , and also some other,now it is a usefull solution that have spent much time to ...
阅读全文
摘要:Create a Dlg's Thread is specail when u want to update the dlg's show in time with the program's running.So,we need create it.here is step:1:create a static function.//likeUINT WINAPI ThreadDlg::MyOwn...
阅读全文
摘要:Thread is very important for us to program.You can take some steps to create it and use it and terminite it.1:create,MUST create a global ThreadProc that run the things you want.like:CTestPint2App th...
阅读全文
摘要:Becuse the SQL CString are used by SQL server that will cloch it and use,if you want to read,not permit;only copy it to avoid it! This have waste my Half a day to find it!by using :updateStr+=" where ...
阅读全文
摘要://get every word in name and then //get every CHINESE's zimu. //to be quickly must at one time get 3 CHINESE's //zimu at one run. //XXX or XX, or X X. //first kill all blunk //this symbo is what? nam...
阅读全文
摘要:1:get the file :imegen.exe in computer,and open and create a txt file:WINPY.txt2:use next code to seek and get.CString desStr="素";char pszPathName[]="WINPY.TXT"; CFile File; CStdioFile sFile;if (!File...
阅读全文
摘要:Peering Inside the PE: A Tour of the Win32 Portable Executable File Format Matt Pietrek March 1994 Matt Pietrek is the author of Windows Internals (Addison-Wesley, 1993). He works at Nu-Mega Techn...
阅读全文
摘要:i have search for many time about this aspect,but there is little about it,not let us share my work about do it.the theory about dll is simple ,but to do it by hand it 's not so easy.1 first,the file:...
阅读全文
摘要:static l 静态变量作用范围在一个文件内,程序开始时分配空间,结束时释放空间,默认初始化为0,使用时可改变其值。 l 静态变量或静态函数,即只有本文件内的代码才可访问它,它的名字(变量名或函数名)在其它文件中不可见。 l 在函数体内生成的静态变量它的值也只能维持 int max_so_far( int curr )//求至今(本次调用)为止最大...
阅读全文
摘要:/* HDC hDC, 打印机dc HBITMAP hBmp, 待打印位图 int iX, 位图的左上角点x坐标 int iY, 位图的左上角点y坐标 double dScaleX, 打印机分辨率和屏幕分辨率x方向的比值,在没有指...
阅读全文
摘要:第七步 实现IClassFactory的方法 实现类CAddFactory的方法。创建一个新文件(AddObjFactory.cpp)。提供类IUnknown和IClassFactory的方法实现。AddRef,Release和QueryInterface方法实现和前面类CAddObj中这三个函数实现基本一样。在方法CreateInstance中,类CaddObj被实例化并且传回其接口指针。L...
阅读全文
摘要:目录: 介绍 接口 第一步:创建IDL文件 第二步:生成类型库 第三步:从IAdd继承 第四步:实现IAdd的方法 第五步:实现IUnkown 第六步:类工厂 第七步:实现IClassFactory的方法 第八步:实现DllGetClassObject 第九步:实现DllCanUnloadNow 第十步:DllRegisterServer和UnregisterServer 第十一步:将IDL文...
阅读全文
摘要:本文提供一个完全用C++实现的进程内(DLL)COM服务器,不要ATL或MFC提供任何支持。用这种方式编写COM对象可以让你深入地洞察到COM处理进程内服务器的方法以及COM是如何创建类工厂的。利用本文提供的这个简单框架你可以实现很基本的COM组件,如外壳扩展(Shell Extensions)等。如果你在使用过程中发现了任何问题,请将它反馈到vckbase@public.hk.hi.cn。...
阅读全文
摘要:走马观花看COM服务器——描述COM服务器的基本要求。服务器生命其管理——描述COM服务器如何控制加载时间。实现接口,从IUnknown开始——展示如何用C++类编写一个接口实现并描述IUnknown之方法的目的。深入CoCreateInstance()——探究CoCreateInstance()的调用机理。COM服务器的注册——描述完成服务器注册所需要的注册表入口。创建COM对象——类工厂...
阅读全文
摘要:COM——到底是什么?——COM标准的要点介绍,它被设计用来解决什么问题? 基本元素的定义——COM术语以及这些术语的含义。 使用和处理COM对象——如何创建、使用和销毁COM对象。 基本接口——描述IUnknown基本接口及其方法。 掌握串的处理——在COM代码中如何处理串。 应用COM技术——例子代码,举例说明本文所讨论的所有概念。 处理HRESULT——HRESULT类型描述,如何监测...
阅读全文
摘要:第一步:运行ATL COM向导(参见图一) 你要做的第一件事情是启动VC创建一个新的工程。选择“ATL COM AppWizard”。注意这个向导创建的工程并没有包含任何初始的COM对象,在完成这个向导之后,要从“ClassView”中用“New ATL Object”命令来指定你想要增加到这个工程中的对象类型。在“Project name”编辑框中为工程取个名字:“Simple_AT...
阅读全文
摘要:1:打印的图片太小; 2:根本打印不出来位图 3:打印预览可见、但打印不出来; 产生这些问题的根本原因,在于对位图的理解不够深刻。 一个CBitmap对象,可能是DDB位图(设备相关位图),或者DIB位图(设备无关位图),其中,一个设备兼容的内存DC中,只能选择该设备兼容的DDB位图或者单色的位图。注意,位图只能被选择进入到设备兼容的内存D...
阅读全文