mfc仿qq聊天软件源码(c语言编程聊天代码)
如何编写一个象QQ这样的聊天程序??
用VC开发比较好吧!
通讯上使用MFC提供的CAsyncSocket或CSocket类就可以了!
界面上就是客户端要麻烦一点,实际上就一个拖鞋树风格的窗体。国外早就有公司写了个CXTPagerCtrl类吧,直接用就可以了!
主要问题:
1、套接字怎么维护,一般放一个链表中。
2、多个用户同一时间连服务端,要用到多线程技术。
我有VC实现的源代码,要的话可以发给你参考一下。
求类似QQ的聊天软件 源代码 (最好是JAVA的,C/C++也行)
很好很强大
mfc仿qq聊天软件源码你要mfc仿qq聊天软件源码的百度上没有mfc仿qq聊天软件源码,去csnd下载频道找吧
一段QQ即时聊天的MFC代码
ShellExecute(NULL,"open","",NULL,NULL,SW_SHOWMAXIMIZED);
参数写错mfc仿qq聊天软件源码了
ShellExecute(NULL,"open","IEXPLORE",i,NULL,SW_SHOWMAXIMIZED); //调用IE,打开上面mfc仿qq聊天软件源码的地
IEXPLORE可以不要
默认为IE
参考MSDN吧
有关ShellExecute
ShellExecute Function
Performs an operation on a specified file.
Syntax
HINSTANCE ShellExecute( HWND hwnd,
LPCTSTR lpOperation,
LPCTSTR lpFile,
LPCTSTR lpParameters,
LPCTSTR lpDirectory,
INT nShowCmd
Parameters
hwnd
[in] Handle to the owner window used for displaying a user interface (UI) or error messages. This value can be NULL if the operation is not associated with a window.
lpOperation
[in] Pointer to a null-terminated string, referred to in this case as a verb, that specifies the action to be performed. The set of available verbs depends on the particular file or folder. Generally, the actions available from an object's shortcut menu are available verbs. For more information about verbs and their availability, see Object Verbs. See Extending Shortcut Menus for further discussion of shortcut menus. The following verbs are commonly used.
edit
Launches an editor and opens the document for editing. If lpFile is not a document file, the function will fail.
explore
Explores the folder specified by lpFile.
find
Initiates a search starting from the specified directory.
open
Opens the file specified by the lpFile parameter. The file can be an executable file, a document file, or a folder.
Prints the document file specified by lpFile. If lpFile is not a document file, the function will fail.
NULL
For systems prior to Microsoft Windows 2000, the default verb is used if it is valid and available in the registry. If not, the "open" verb is used.
For Windows 2000 and later systems, the default verb is used if available. If not, the "open" verb is used. If neither verb is available, the system uses the first verb listed in the registry.
lpFile
[in] Pointer to a null-terminated string that specifies the file or object on which to execute the specified verb. To specify a Shell namespace object, pass the fully qualified parse name. Note that not all verbs are supported on all objects. For example, not all document types support the "print" verb.
lpParameters
[in] If the lpFile parameter specifies an executable file, lpParameters is a pointer to a null-terminated string that specifies the parameters to be passed to the application. The format of this string is determined by the verb that is to be invoked. If lpFile specifies a document file, lpParameters should be NULL.
lpDirectory
[in] Pointer to a null-terminated string that specifies the default directory.
nShowCmd
[in] Flags that specify how an application is to be displayed when it is opened. If lpFile specifies a document file, the flag is simply passed to the associated application. It is up to the application to decide how to handle it.
SW_HIDE
Hides the window and activates another window.
SW_MAXIMIZE
Maximizes the specified window.
SW_MINIMIZE
Minimizes the specified window and activates the next top-level window in the z-order.
SW_RESTORE
Activates and displays the window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when restoring a minimized window.
SW_SHOW
Activates the window and displays it in its current size and position.
SW_SHOWDEFAULT
Sets the show state based on the SW_ flag specified in the STARTUPINFO structure passed to the CreateProcess function by the program that started the application. An application should call ShowWindow with this flag to set the initial show state of its main window.
SW_SHOWMAXIMIZED
Activates the window and displays it as a maximized window.
SW_SHOWMINIMIZED
Activates the window and displays it as a minimized window.
SW_SHOWMINNOACTIVE
Displays the window as a minimized window. The active window remains active.
SW_SHOWNA
Displays the window in its current state. The active window remains active.
SW_SHOWNOACTIVATE
Displays a window in its most recent size and position. The active window remains active.
SW_SHOWNORMAL
Activates and displays a window. If the window is minimized or maximized, Windows restores it to its original size and position. An application should specify this flag when displaying the window for the first time.
Return Value
Returns a value greater than 32 if successful, or an error value that is less than or equal to 32 otherwise. The following table lists the error values. The return value is cast as an HINSTANCE for backward compatibility with 16-bit Windows applications. It is not a true HINSTANCE, however. The only thing that can be done with the returned HINSTANCE is to cast it to an int and compare it with the value 32 or one of the error codes below.
0 The operating system is out of memory or resources.
ERROR_FILE_NOT_FOUND The specified file was not found.
ERROR_PATH_NOT_FOUND The specified path was not found.
ERROR_BAD_FORMAT The .exe file is invalid (non-Microsoft Win32 .exe or error in .exe image).
SE_ERR_ACCESSDENIED The operating system denied access to the specified file.
SE_ERR_ASSOCINCOMPLETE The file name association is incomplete or invalid.
SE_ERR_DDEBUSY The Dynamic Data Exchange (DDE) transaction could not be completed because other DDE transactions were being processed.
SE_ERR_DDEFAIL The DDE transaction failed.
SE_ERR_DDETIMEOUT The DDE transaction could not be completed because the request timed out.
SE_ERR_DLLNOTFOUND The specified dynamic-link library (DLL) was not found.
SE_ERR_FNF The specified file was not found.
SE_ERR_NOASSOC There is no application associated with the given file name extension. This error will also be returned if you attempt to print a file that is not printable.
SE_ERR_OOM There was not enough memory to complete the operation.
SE_ERR_PNF The specified path was not found.
SE_ERR_SHARE A sharing violation occurred.
Remarks
This method allows you to execute any commands in a folder's shortcut menu or stored in the registry.
To open a folder, use either of the following calls:
ShellExecute(handle, NULL, fully_qualified_path_to_folder, NULL, NULL, SW_SHOWNORMAL);
or
ShellExecute(handle, "open", fully_qualified_path_to_folder, NULL, NULL, SW_SHOWNORMAL);
To explore a folder, use:
ShellExecute(handle, "explore", fully_qualified_path_to_folder, NULL, NULL, SW_SHOWNORMAL);
To launch the Shell's Find utility for a directory, use:
ShellExecute(handle, "find", fully_qualified_path_to_folder, NULL, NULL, 0);
If lpOperation is NULL, the function opens the file specified by lpFile. If lpOperation is "open" or "explore", the function attempts to open or explore the folder.
To obtain information about the application that is launched as a result of calling ShellExecute, use ShellExecuteEx.
Note The Launch folder windows in a separate process setting in Folder Options affects ShellExecute. If that option is disabled (the default setting), ShellExecute uses an open Explorer window rather than launch a new one. If no Explorer window is open, ShellExecute launches a new one.
Windows 95/98/Me: ShellExecute is supported by the Microsoft Layer for Unicode. To use this, you must add certain files to your application, as outlined in Microsoft Layer for Unicode on Windows 95/98/Me Systems.
Function Information
Minimum DLL Version shell32.dll version 3.51 or later
Custom Implementation No
Header shellapi.h
Import library shell32.lib
Minimum operating systems Windows NT 3.1, Windows 95
Unicode Implemented as ANSI and Unicode versions.
See Also
IShellExecuteHook
© 2005 Microsoft Corporation. All rights reserved.
如何利用MFC编写一个类似于QQ的聊天软件?
要实现一个服务器一个客户端的聊天很简单,用UDP,知道IP端口就好办。我觉得要实现像QQ一样的聊天软件难点在1、外网通信,要NAT穿透什么的。。。两个路由器后面的IP就很难连接 2、多用户同时参与聊天时候后台的逻辑设计。。
可能说的不对,不过这是我当时想实现这类聊天软件功能时遇到的最大问题。
仅供交流= =
求用C语言写一个类似QQ的聊天工具的源码
mfc仿qq聊天软件源码你为什么要用C语言编写聊天工具呢?直接下载一个使用就行了。
QQ聊天工具是腾迅公司好多员工日夜奋战mfc仿qq聊天软件源码的结果mfc仿qq聊天软件源码,那能让你一个人就能制作出来像它那样的。
大概过程应该是mfc仿qq聊天软件源码:用C语言实现网络中的文字信息交换,同时还要有数据库系统支持,再者要实现与Windows平台有很好的兼容性。
易语言 仿QQ聊天工具 或 聊天室 源码
mfc仿qq聊天软件源码你好,
mfc仿qq聊天软件源码我有几百套易语言源码和模块,欢迎大家交流,共同进步
随时共享
这是我们易语言人自己mfc仿qq聊天软件源码的交流群mfc仿qq聊天软件源码:132157144 希望大家一起进步,本人随时解答各类疑问
还不懂得话,继续联系