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
MyMonitor.cpp
Package: multi_thread_udp.zip [view]
Upload User: deligs
Upload Date: 2007-01-08
Package Size: 43k
Code Size: 3k
Category:
WinSock-NDIS
Development Platform:
Visual C++
- // MyMonitor.cpp : Defines the class behaviors for the application.
- //
- #include "stdafx.h"
- #include "MyMonitor.h"
- #include "MainFrm.h"
- #include "Splash.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CMyMonitorApp
- BEGIN_MESSAGE_MAP(CMyMonitorApp, CWinApp)
- //{{AFX_MSG_MAP(CMyMonitorApp)
- //}}AFX_MSG_MAP
- // Standard file based document commands
- ON_COMMAND(ID_FILE_NEW, CWinApp::OnFileNew)
- ON_COMMAND(ID_FILE_OPEN, CWinApp::OnFileOpen)
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CMyMonitorApp construction
- CMyMonitorApp::CMyMonitorApp()
- {
- // TODO: add construction code here,
- // Place all significant initialization in InitInstance
- }
- /////////////////////////////////////////////////////////////////////////////
- // The one and only CMyMonitorApp object
- CMyMonitorApp theApp;
- /////////////////////////////////////////////////////////////////////////////
- // CMyMonitorApp initialization
- BOOL CMyMonitorApp::InitInstance()
- {
- // CG: The following block was added by the Splash Screen component. { CCommandLineInfo cmdInfo; ParseCommandLine(cmdInfo); CSplashWnd::EnableSplashScreen(cmdInfo.m_bShowSplash); }
- // Enable Socket support
- if (!AfxSocketInit())
- {
- AfxMessageBox(IDP_SOCKETS_INIT_FAILED);
- return FALSE;
- }
- // Standard initialization
- // If you are not using these features and wish to reduce the size
- // of your final executable, you should remove from the following
- // the specific initialization routines you do not need.
- #ifdef _AFXDLL
- Enable3dControls(); // Call this when using MFC in a shared DLL
- #else
- Enable3dControlsStatic(); // Call this when linking to MFC statically
- #endif
- // Change the registry key under which our settings are stored.
- // TODO: You should modify this string to be something appropriate
- // such as the name of your company or organization.
- SetRegistryKey(_T("UDP Test :)"));
- // To create the main window, this code creates a new frame window
- // object and then sets it as the application's main window object.
- CMainFrame* pFrame = new CMainFrame;
- m_pMainWnd = pFrame;
- // create and load the frame with its resources
- pFrame->LoadFrame(IDR_MAINFRAME,
- WS_OVERLAPPEDWINDOW | FWS_ADDTOTITLE, NULL,
- NULL);
- LoadStdProfileSettings(); // Load standard INI file options (including MRU)
- // The one and only window has been initialized
- m_pMainWnd->ShowWindow(SW_HIDE); // Hide it, so you cannot see it on the desktop
- m_pMainWnd->UpdateWindow();
- return TRUE;
- }
- /////////////////////////////////////////////////////////////////////////////
- // CMyMonitorApp message handlers
- BOOL CMyMonitorApp::PreTranslateMessage(MSG* pMsg)
- {
- // CG: The following lines were added by the Splash Screen component. if (CSplashWnd::PreTranslateAppMessage(pMsg)) return TRUE; return CWinApp::PreTranslateMessage(pMsg);
- }