局域网通信软件飞鸽传书源代码

所需积分/C币:14 2012-07-07 09:38:13 775KB PDF

局域网通信软件飞鸽传书的源代码 , 利用MFC实现, 很好的学习资源哦~~亲
源文件 INSTALL.女装程序 头文件 以上是 IP Messenger的主要目录及其主要源文件的描述,通过列表我们可以 清晰看出 IP Messenger的功能分布。在以下的详细分析中,我们主要围绕着这些 源文件而展开 3、 IP Messenger源代码的工程转换 由于 IP Messenger是使用以前版本的vC编写的,因此在打开工程文件时,需要 转换该工程文件为VC6版本的工程文件 双击打开 IPMSO.MDP文件,系统提示转换 IPMSG MAK工程配置文件到VC6 下的工程文件,如下图所示 Microsoft visual+t aloadsipmsg206srclipmsg206src\IPMSG MAK This project was generated by a previous version of Developer Studio and must be converted to the new Format. A backup copy of your original File mill D: ydownloadsipmsg206src'ipmsg2065rc\IPMSG.001 Do you want to convert the proje TYes will also automatic ally convert any other projects in 否(N 取消 单击“是”按钮,确定将工程转换成VC6的工程。系统提示将MAK工程文件转 换成DSP工程文件,如下图所小。 Microsoft Visual C++ Pro been successfully converted and the following new proje Files added to the workspace D:downloads,ipmsg 206srciprsg206src IPMSG DSP Never delete these project files (.dsp)or you will have to recreate your project You can still export. mak Files, but these cannot be read back in without the corresponding dsp File: project header files and resource files in the project the conversion process tries to mport the appropriate Files into your project, however it is impossible to anticipate every situation If you see an External Depen Folder in your project after conversion, this will include files that were not recognized as belonging in the project, You should carefully review these Files and drag and drop into the project any that were missed Similarly, if the converted project contains files which should really be external Ao pendencies, simply delete thern from the project and they will automatically be added pendence 确定 单击“确定”按钮,系统根据MAK文件生成 IPMSGDSP文件,以及VC6下的 IPMSG.DSW文件,另外系统还生成了 IPMSG NCB和 IPMSG OPT两个文件。 4、 IP Messenger的工程配置 IP Messenger的配置和目前VC6的工程配置有些不同,其安装工程文件和工 程文件在混合在起,不像VC6工程文件,不同的工程在不同的项目下,分别 进行配置。 单击“ Build菜单,选择“ Set Active Configuration.”,弹出“ Set Active Project Configuration对话框,如下图所小 Set Active Project Configuration Project configurations: OK ipmsg- Win 32 English ipmsg -win32 Japanese Cancel ipmsg.-wYin32 Debug ipmsg-Win32 Installer ipmsg-Win32 InstallerDbg ipmsg-win 32 InstallerEng IP Messenger的工程配置有6个,分别是 Release的英文、日文以及 Debug 的 Ipmsg工程和安裝工程。通过选择不同的配置,可以编译出不同的工程。根据 需要,我们选择 ipmsg-Win32 Debug配置作为当前活动工程,此编译配置可以编 译出 Debug版的 Ipmsg 单击“ Project”菜单,选择“ Settings.”,弹出“ Project Settings”对话框,选择ˇCC++” 标签栏,如下图所示。 Project settings Setings For: Win32 Debug General Debug C/C++ Link I Resources I pmsg Cate eneral Reset Yarning level Optimization Level 3 Disable (Debug 厂 Warnings as errors r Generate browse info Debug info: Program Database for Edit and Continue reprocessor detinitions WIN32, DEBUG, _WINDOWS,JAPANESE Project Options: anolog MLd N3 /Gm /GX/Z1,0d D" D DEBUG" /D WINDOWS"/D APANESE /Fp"abjldebug/IPMSG- pch"MX/Fo".objldebug/ OK Cancel 可以看到,在“ Preprocessor definition:”中,工程使用了“ JAPANES宏定义 也就是说,编译后的 Debug版的 Iping是日文版。当然,可以根据需要,修改 此宏为 ENGLISH”,就可以编译出 Debug版的英文 Ipmsg 5、系统概述完成上述操作之后,就可以使用VC++6来编译、调试 IP Messenger 当然,在以后的分析中,我们将分析 Ipmsg的安装工程,那么就应当选择 Ipmsg-win32 Installerdbg配置作为当前活动工程,编译出 Debug版的安装工程 (转)IMSG飞鸽传书—关于对话框 2010-05-0911:06 关于本软件 飞鸽传书 IP Messenger M2.06 Copright (c 1996-2004 H. Shirouru 中文版由 Arhi tet制作 TWin是所有窗口的父类,TDg是对话框子类,处理了 WM INITDILOG等消息 创建过程:首先 aboutDlg= new taboutDlg;然后 Create(),最后Show() Create()是TDlg类的函数,首先把当前的Twin对象 aboutDlg的指针加入到 wndarray中, 然后调用SDK函数 CreateDialog来完成对话框的创建,然后进入TApp的 Win proc,调用TDlg的 Win proc函数来 处理消息, 发送 WM INITDIALOG消息,调用 TAboutDIg类的 EvCreate函数米处理 接着是Show(函数,发送 WM NCPAINT消息,接着发送 WM PAINT消息,后面是 CTLCOLOR 消息,调用 Eventctlcolor()函数来处理(5次)。后面一直发送 WM NCPAINT消息; 接下来则是 TAboutDlg来处理按钮消息了,按下按钮后会访问指定的网页。处理 EvCommand 消息, 访问 IPMSGURL MSGSTR指定的网页, 在 msgStro h文件中有定义:# define IpmSgurLMsgstrHttp://www.ipmsg.org/index.html.en TAboutDIg是关于对话框,这里仅分析TDg类和 TAboutDIg类的代码: 对话框类,Twin的子类 class TDIg: public t Win protected LPSTR res Name;/资源的名字 UⅠ NT resId;资源的id BOOL modalFlg;模式对话框还是非模式对话框 pl TDIg(LPSTR name, TWin parent=NULL) TDIgqUINT resid, TWin parent- NULL) virtual(; virtual BOOL Create(HINSTANCE hI- NULL) virtual void Destroy(void) virtual int Exec(void) virtual void EndDialog(int UINT ResId(void) t return resid virtual BOOL EvCreate (LPARAM IParam) virtual BOoL Ev Command word wNotify Code, WORd wID, LPARAM hwndCtl virtual BOoL EvSys Command(WPARAM uCmdType, POINTS poS); virtual bool EyQueryOpen(void) virtual BOOL PreProcMsg (MSG*msg) virtual lreSULT WinProc(UINT uMsg, WPARAM wParam, LPARAM IParam) TDlg的实现文件: static char *tdlg id a() Copyright(C)H. Shirouzu 1996-2001 tdlg cpp verb.95 水 Project Name Win32 Lightweight Class Library Test Module name Dialog class Create 1996-06-01(Sat) Update 2001-12-06(Thu) Copyright H. Shirouzu Reference #include lib. h TDIg: TDIg(LPSTR resName, TWin parent): TWin( parent) ∥将字符串 renAme复制到 rename中 resName-strdup( renAme resid=0: modalFlg= FALSE:/默认的都是非模式对话框 TDIg: TDIgqUiNt resid, TWin parent): TWin( parent) renAme= NULL resId- resId modalFlg= FALSE;/默认的都是非模式对话框 TDlg: TRIgO∥调用 EndDialog方法来关闭对话框 if(hWnd EndDialog(FAlSe) 释放 renAme资源 (renAme) frcc( renAme BOOL TDIg: Create(HINSTANCE hInstance) /把 pre Wnd指向当前窗口,这里并没有加入 wndarray,因为这时的hwnd还没有建立起来 TApp: Add Win( this The CreateDialog macro creates a modeless dialog box from a dialog box template resourcc The CreateDialog macro uses the CreateDialog Param function HWND CreateDialog( HINSTANCE hInstancc.// handle to module LPCTSTR lpTemplate, / dialog box template name HWND hWndParent. / handle to owner window DlGPROC lpDialogFunc //dialog box procedure ) Parameters hInstance in Handle to the module whose executable file contains the dialog box template TeMplate lin] Specifies the dialog box template This parameter is either the pointer to a null-terminated character string that specifies the name of the dialog box template or an intcger valuc that specifics the resource identifier of the dialog box template. If the parameter specifies a resource identifier, its high-order word must be zero and its low-order word must contain the identifier You can use the makeintresource macro to create this value hWndParent in] Handle to the window that owns the dialog box lp DialogO n] pointer to the dialog box procedure Return values If the function succeeds the return value is the handle to the dialog be g If the function fails. the return value iS Null 注意这里的 addwin只是简单的将 prewnd指向win,如果创建失败我们 在 Delwin中只需要简单的将 prewnd置空就行了,不用从链表中删除, 那样太慢 创建对话框的hWnd窗口!! if((hWnd-: CreateDialog( hInstance hInstance: TApp: hl, resId?(LPCSTRresld: resNamc, parent? parcnt-hWnd: NULL (LGPROC)TApp: WinProc))==NULL return TApp: Del Win(this), FALSE else {、 return true: int TDlg: Exec(void) TApp Add Win(this modalFlg=TRUE;默认的是 modifi The Dialog Box macro creates a modal dialog box from a dialog box template resource Dialog Box does not return control until the specified callback function terminates the modal dialog box by calling the enddialog function. Thc Dialog Box macro uscs thc Dialog Box Param function INT PTR DialogBox( HINSTANCE hInstance. / handle to module LPCTSTR lpTemplatc, //dialog box template HWND hWndParent. / handle to owner window DLGPRoC IpDialogfunc / dialog box procedure ); Parameters hInstance in] Handle to the module whose executable file contains the dialog box template TeMplate in] Specifies the dialog box template. This parameter is either the pointer to a null-terminated character string that specifies the name of the dialog box template or an integer value that specifies the resource identifier of the dialog box template. If the parameter specifies a resource identifier, its high-order word must be zero and its low-order word must contain the identifier

...展开详情
试读 127P 局域网通信软件飞鸽传书源代码
img
leonrd

关注 私信 TA的资源

上传资源赚积分,得勋章
    最新推荐
    局域网通信软件飞鸽传书源代码 14积分/C币 立即下载
    1/127
    局域网通信软件飞鸽传书源代码第1页
    局域网通信软件飞鸽传书源代码第2页
    局域网通信软件飞鸽传书源代码第3页
    局域网通信软件飞鸽传书源代码第4页
    局域网通信软件飞鸽传书源代码第5页
    局域网通信软件飞鸽传书源代码第6页
    局域网通信软件飞鸽传书源代码第7页
    局域网通信软件飞鸽传书源代码第8页
    局域网通信软件飞鸽传书源代码第9页
    局域网通信软件飞鸽传书源代码第10页
    局域网通信软件飞鸽传书源代码第11页
    局域网通信软件飞鸽传书源代码第12页
    局域网通信软件飞鸽传书源代码第13页
    局域网通信软件飞鸽传书源代码第14页
    局域网通信软件飞鸽传书源代码第15页
    局域网通信软件飞鸽传书源代码第16页
    局域网通信软件飞鸽传书源代码第17页
    局域网通信软件飞鸽传书源代码第18页
    局域网通信软件飞鸽传书源代码第19页
    局域网通信软件飞鸽传书源代码第20页

    试读已结束,剩余107页未读...

    14积分/C币 立即下载 >