Code/Resource
Windows Develop
Linux-Unix program
Internet-Socket-Network
Web Server
Browser Client
Ftp Server
Ftp Client
Browser Plugins
Proxy Server
Email Server
Email Client
WEB Mail
Firewall-Security
Telnet Server
Telnet Client
ICQ-IM-Chat
Search Engine
Sniffer Package capture
Remote Control
xml-soap-webservice
P2P
WEB(ASP,PHP,...)
TCP/IP Stack
SNMP
Grid Computing
SilverLight
DNS
Cluster Service
Network Security
Communication-Mobile
Game Program
Editor
Multimedia program
Graph program
Compiler program
Compress-Decompress algrithms
Crypt_Decrypt algrithms
Mathimatics-Numerical algorithms
MultiLanguage
Disk/Storage
Java Develop
assembly language
Applications
Other systems
Database system
Embeded-SCM Develop
FlashMX/Flex
source in ebook
Delphi VCL
OS Develop
MiddleWare
MPI
MacOS develop
LabView
ELanguage
Software/Tools
E-Books
Artical/Document
IE.cpp
Package: 视频会议系统.rar [view]
Upload User: popouu88
Upload Date: 2013-02-11
Package Size: 2894k
Code Size: 2k
Category:
VOIP program
Development Platform:
Visual C++
- // IE.cpp : Defines the initialization routines for the DLL.
- //
- #include "stdafx.h"
- #include "IE.h"
- #include "MainFrame.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /*
- 协同浏览模块
- 接口
- 1 、 创建IE窗口
- 2 、 设定url
- 数据包的定义可以定义为
- 窗口号 id + url
- 窗口号是标志着IE窗口的唯一值,通过这个id可以通知远程同id号的窗口的url改变
- */
- BEGIN_MESSAGE_MAP(CIEApp, CWinApp)
- //{{AFX_MSG_MAP(CIEApp)
- // NOTE - the ClassWizard will add and remove mapping macros here.
- // DO NOT EDIT what you see in these blocks of generated code!
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CIEApp construction
- CIEApp::CIEApp()
- {
- }
- /////////////////////////////////////////////////////////////////////////////
- // The one and only CIEApp object
- CIEApp theApp;
- //创建窗口
- extern "C" __declspec( dllexport ) CWnd * CreateIEWnd( void ( * OnIEURL )( void * wParam , CWnd * pWnd , char * buffer , int size ) , void * wParam , const char * user_name )
- {
- AFX_MANAGE_STATE(AfxGetStaticModuleState());
- CMainFrame * frame = new CMainFrame( );
- frame->OnIEURL = OnIEURL;
- frame->wParam = wParam;
- frame->user_name = user_name;
- return frame;
- }
- //设定消息
- extern "C" __declspec( dllexport ) void SetIEMessage( CWnd * pIEWnd , char * buffer , int size )
- {
- AFX_MANAGE_STATE(AfxGetStaticModuleState());
- if( ! ::IsWindow( pIEWnd->GetSafeHwnd( ) ) || ! buffer )
- return;
- //解析数据包
- //id值
- int id = *( int * )buffer; buffer += sizeof( int );
- //2、用户名
- CString username = (char * )buffer; buffer += username.GetLength( ) + sizeof( char );
- //3、网址
- //转换为框架窗口
- CMainFrame * frame = ( CMainFrame * )pIEWnd;
- //查找对应的ie窗口
- CIEView * ieView = NULL;
- for( int i = 0 ; ; i ++ )
- {
- ieView = frame->GetView( )->GetIEView( i );
- //找到ie窗口
- if( ! ieView || ( ieView->ieid == id && ieView->username == username ) )
- break;
- }
- if( ! ieView )
- { //创建ie窗口
- ieView = frame->GetView( )->CreateIEView( );
- //给定用户名
- ieView->username = username;
- //给定id
- ieView->ieid = id;
- }
- ieView->Stop( );
- //浏览
- ieView->Navigate2( buffer );
- }