一段QQ即时聊天的MFC代码

作者&投稿:常娄 (若有异议请与网页底部的电邮联系)
qq即时聊天代码~

正解



淘宝举例:

你去CSDN上搜吧 , 这里应该没人做的,你搜到之后自己修改下就符合你的要求了

ShellExecute(NULL,"open","http://www.baidu.com/",NULL,NULL,SW_SHOWMAXIMIZED);
参数写错了
ShellExecute(NULL,"open","IEXPLORE",i,NULL,SW_SHOWMAXIMIZED); //调用IE,打开上面的地
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.
print
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.

updata(true);

这个专家真能拉,给个地址就行了!

QQ爱


除了QQ还有哪些聊天工具?
商讯BB拥有语音,视频,文件传输,离线短信息通知,免费电话回呼和手机登陆客户端管理等一系列强大的即时通讯功能,可以轻松满足用户在线咨询,在线交流,互动聊天,在线交易,交好友等等上网需求;适用于各大电子商务网站,如B2B网站,B2C网站和C2C模式网站的在线应用,同时也非常适用于各大娱乐,资讯门户网站,如博客网,社区网站,...

MChat是什么类型的聊天软件?
1998年,腾讯研发团队为QQ用户突破100人而“兴奋不已”;2000年前后,业内传马化腾打算把QQ作价100万卖给深圳电信,但深圳电信却不要。到

手机挂qq聊天一个月14M够吗
要看是什么手机 安卓就很费流量

QQ聊天两小时MB
您好!单挂Q每小时也就100kb左右,3小时300kb (1M等与1024kb)。30天每天挂3小时大概8-9M。聊天比较难讲:一个字两个字节,1K就是512个字,1M有5120个字,qq表情一个四字节。总的来说,根据你的聊天发字体跟图片,浏览空间来算,其中浏览空间是比较费流量的。由于不清楚你的打字聊天频率,这个...

QQ聊天的快捷键有哪些
Ctrl+M输入框里回车(跟回车一个效果)\\x0d\\x0a\\x0d\\x0a10.Ctrl+L对输入框里当前行的文字左对齐\\x0d\\x0a\\x0d\\x0a11.Ctrl+R对输入框里当前行的文字右对齐\\x0d\\x0a\\x0d\\x0a12.Ctrl+E对输入框里当前行的文字居中\\x0d\\x0a\\x0d\\x0a12.Ctrl+V在qq对话框里实行粘贴\\x0d\\...

QQ聊天的快捷键大全
Ctrl+Z:清空\/恢复输入框里的文字并恢复为默认显示大小;Ctrl+F:QQ里直接显示字体设置工具条,TM弹出“字体”设置对话框;Ctrl+G:QQ中无对应功能,TM会弹出“TM设置”窗口;Ctrl+I:QQ实现在输入框中输入表格符,TM则打开“查看用户信息”窗口;Ctrl+J:输入框里回车;Ctrl+M:在QQ实现输入框里...

用QQ视频聊天一个小时需要多少流量呢?
QQ视频聊天一般每小时需要50MB的流量,也就是说,一个月大概在1.5GB\/30小时,应该不是很大,每15分钟好像1,2毛钱。日常流量花费:1,播放1个小时高清电影大概1GB左右流量 2、播放1个小时普通电影大概400M左右流量 3、播放1个小时音乐大概65M左右流量 4,QQ聊天1个小时大概1M流量(用手机qq聊天,不是...

想用手机qq和别人视频聊天,费流量吗,一小时最多的话是多少M?
你好,聊天不费流量的,只要没有图片,一个小时也话不了多少。望采纳

跪求QQ的快捷聊天代码
1.Alt+S 快速回复 2.Alt+C 关闭当前窗口 Alt + F4也是关闭 3.Alt+H 打开聊天记录 4.Alt+T 更改消息模式 5.Ait+J 打开聊天纪录 6.Ctrl+A 全选当前对话框里的内容 7.Ctrl+F QQ里直接显示字体设置工具条 8.Ctrl+J 输入框里回车(跟回车一个效果)9.Ctrl+M 输入框里回车(跟回车一个效果...

电信 华为c8812 一天上2个小时的qq 一个月要多少流量啊 求解
如果没用其它应用的话,只有QQ,24小时只登陆QQ40~60M随时聊天90M左右,QQ 视频聊天 300M,如过其它应用加起来或上上网什么、下载应用什么的可能要300~400M。我现在 有QQ、微博 、空间、朋友网 、一个月要900多M现在我用1G的,现在的智能机我建议开500M的(网速好可以 省流量 ,建议下个360随时...

原州区13527087256: 你好!可以把QQ临时会话的代码给我个吗!谢谢 -
勇魏伸宁: 新建个文本输入:@Echo Off:sendSet /p num=请输入对方的QQ号码:If /I "%num%"=="n" Exitstart tencent://Message/?Uin=%num%...

原州区13527087256: 求点击QQ弹出临时聊天窗口的代码
勇魏伸宁: 把横线下面的代码复制下来建立一个记事本文件1.txt,将代码粘贴进去,保存.然后将记事本文件的扩展名改为htm即文件变为1.htm.然后登录QQ.打开1.htm文件,ie可能会阻止脚本运行,选择允许就可以了,然后你随便输入一个QQ号,然后...

原州区13527087256: 关于QQ临时会话的代码.有的发一个!!!!!!!!!谢谢了
勇魏伸宁: amp;lt;!DOCTYPEnbsp;HTMLnbsp;PUBLICnbsp;“-//W3C//DTDnbsp;HTMLnbsp;4.0nbsp;Transitional//EN“amp;gt;amp;lt;HTMLamp;gt;amp;lt;HEADamp;gt;amp;lt;TITLEamp;gt;QQ临时会话amp;lt;/TITLEamp;gt;amp;lt;METAnbsp;http-equiv=...

原州区13527087256: 求助!!怎么实现MFC在主对话框中点击按钮再弹出新的对话框 ? -
勇魏伸宁: 首先新建一个对话框资源,并建一个相应的类,然后再按钮点击事件中加入如下代码即可(假设你见的对话框类为DLG): DLG dlg; dlg.DoModal();

原州区13527087256: 关于QQ临时会话的代码.有的发一个!!!!!!!!!谢谢了 -
勇魏伸宁: QQ临时会话<...

原州区13527087256: 跪求QQ的快捷聊天代码 -
勇魏伸宁: 1.Alt+S 快速回复 2.Alt+C 关闭当前窗口 Alt + F4也是关闭3.Alt+H 打开聊天记录 4.Alt+T 更改消息模式 5.Ait+J 打开聊天纪录 6.Ctrl+A 全选当前对话框里的内容 7.Ctrl+F QQ里直接显示字体设置工具条 8.Ctrl+J 输入框里回车(跟回车一个效果) 9....

原州区13527087256: 如何编写一个象QQ这样的聊天程序??
勇魏伸宁: 用VC开发比较好吧! 通讯上使用MFC提供的CAsyncSocket或CSocket类就可以了! 界面上就是客户端要麻烦一点,实际上就一个拖鞋树风格的窗体.国外早就有公司写了个CXTPagerCtrl类吧,直接用就可以了! 主要问题: 1、套接字怎么维护,一般放一个链表中. 2、多个用户同一时间连服务端,要用到多线程技术. 我有VC实现的源代码,要的话可以发给你参考一下.

原州区13527087256: 制作QQ临时聊天工具的VB代码 -
勇魏伸宁: http://wpa.qq.com/msgrd?V=1&Uin=123456&&Menu=yes 123456设置你要聊天的QQ就可以了

原州区13527087256: 用MFC写一个聊天的程序,有点问题. -
勇魏伸宁: 你的这个聊天系统的结构是怎样的?是由服务器转发各客户端的消息吗?还有,你用的是阻塞模式还是非阻塞模式?我自己也做了聊天程序的,功能和界面基本和QQ一样.消息由服务器转发.当然,这个在实际中不好用,因为用户量大时服务器会非常忙.所以应该做些路由及TCP打洞之类的模块.

原州区13527087256: 求QQ强行聊天的代码,没种语言的代码都要 -
勇魏伸宁: Dim QQ_NUM if Wscript.arguments.count<1 thenQQ_NUM=InputBox("by:作者 QQ:作者QQ"&vbCr&vbCr&" "&vbCr&vbCr&" ","QQ强行聊天器","默认QQ")if QQ_NUM="" thenWscript.quitend if elseVQQ_NUM = Wscript....

本站内容来自于网友发表,不代表本站立场,仅表示其个人看法,不对其真实性、正确性、有效性作任何的担保
相关事宜请发邮件给我们
© 星空见康网