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
PointInfo.cpp
Package: VC++practise.rar [view]
Upload User: z_mail1980
Upload Date: 2007-06-01
Package Size: 647k
Code Size: 2k
Category:
SNMP
Development Platform:
Visual C++
- // PointInfo.cpp : implementation file
- //
- #include "stdafx.h"
- #include "exam3.h"
- #include "PointInfo.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CPointInfo dialog
- CPointInfo::CPointInfo(CWnd* pParent /*=NULL*/)
- : CDialog(CPointInfo::IDD, pParent)
- {
- //{{AFX_DATA_INIT(CPointInfo)
- m_strMouseX = _T("");
- m_strMouseY = _T("");
- //}}AFX_DATA_INIT
- m_pParentWnd=pParent;
- }
- void CPointInfo::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(CPointInfo)
- DDX_Control(pDX, IDC_POINT_LIST, m_List);
- DDX_Text(pDX, IDC_MOUSE_X, m_strMouseX);
- DDX_Text(pDX, IDC_MOUSE_Y, m_strMouseY);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(CPointInfo, CDialog)
- //{{AFX_MSG_MAP(CPointInfo)
- ON_BN_CLICKED(IDC_DELETE, OnDelete)
- ON_BN_CLICKED(IDC_CLOSE, OnClose)
- ON_MESSAGE(WM_ADD_POINT,OnAddPoint)
- ON_MESSAGE(WM_MOUSE_CHANGED,OnMouseChanged)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CPointInfo message handlers
- void CPointInfo::OnDelete()
- {
- int index=m_List.GetCurSel();
- if(index==LB_ERR) return;
- m_List.DeleteString(index);
- m_pParentWnd->SendMessage(WM_DELETE_POINT,0,(LPARAM)index);
- }
- void CPointInfo::OnClose()
- {
- ShowWindow(SW_HIDE);
- }
- void CPointInfo::OnAddPoint(WPARAM wParam,LPARAM lParam)
- {
- int x=LOWORD(lParam);
- int y=HIWORD(lParam);
- CString szString;
- szString.Format("(%d,%d)",x,y);
- m_List.AddString(szString);
- }
- void CPointInfo::OnMouseChanged(WPARAM wParam,LPARAM lParam)
- {
- int x=LOWORD(lParam);
- int y=HIWORD(lParam);
- m_strMouseX.Format("x= %d",x);
- m_strMouseY.Format("y= %d",y);
- UpdateData(FALSE);
- }