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
OUTPUTREPORT.CPP
Package: SNMP_source.rar [view]
Upload User: lvjun8202
Upload Date: 2013-04-30
Package Size: 797k
Code Size: 3k
Category:
SNMP
Development Platform:
C/C++
- // OutputReport.cpp : implementation file
- //
- #include "stdafx.h"
- #include "oam.h"
- #include "OutputReport.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // COutputReport
- COutputReport::COutputReport()
- {
- m_nHasAlert = 0;
- m_nSplashCnt = 0;
- m_nChildID = 0;
- }
- COutputReport::~COutputReport()
- {
- }
- BEGIN_MESSAGE_MAP(COutputReport, TOutputWnd)
- //{{AFX_MSG_MAP(COutputReport)
- ON_WM_CONTEXTMENU()
- ON_COMMAND(ID_CLEAR_REPORT, OnClear)
- ON_COMMAND(ID_HIDE_REPORT, OnHideReport)
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // COutputReport message handlers
- void COutputReport::UpdateHScroll()
- {
- if( m_bWordWrap ) return; // No need for word-wrapped output windows
- CRect clientRc; GetClientRect( &clientRc );
- int nMax = m_nMaxWidth - clientRc.Width();
- // m_wndSheet.ShowScrollBar(bShow);
- // if (bShow)
- // {
- // CRect rect; GetClientRect(rect);
- // m_wndSheet.GetScrollBar().SetScrollRange(0, SumWidthColumns() - rect.Width());
- // }
- if( nMax <= 0 )
- //InActivateHScrollBar
- {
- m_nXOffset = 0;
- }
- else
- //ActivateHScrollBar
- {
- }
- }
- int COutputReport::GetHScrollRange()
- {
- if( m_bWordWrap ) return 0; // No need for word-wrapped output windows
- CRect clientRc; GetClientRect( &clientRc );
- int nMax = m_nMaxWidth - clientRc.Width();
- if( nMax <= 0 )
- m_nXOffset = 0;
- return max(0,nMax);
- }
- void COutputReport::OnContextMenu(CWnd* pWnd, CPoint point)
- {
- // TODO: Add your message handler code here
- // TODO: Add your message handler code here
- if (point.x == -1 && point.y == -1){
- //keystroke invocation
- CRect rect;
- GetClientRect(rect);
- ClientToScreen(rect);
- point = rect.TopLeft();
- point.Offset(5, 5);
- }
- CMenu menu;
- VERIFY(menu.LoadMenu(IDR_MENU_LISTBOX));
- CMenu* pPopup = menu.GetSubMenu(0);
- ASSERT(pPopup != NULL);
- CWnd* pWndPopupOwner = this;
- // while (pWndPopupOwner->GetStyle() & WS_CHILD)
- // pWndPopupOwner = pWndPopupOwner->GetParent();
- pPopup->TrackPopupMenu(TPM_LEFTALIGN | TPM_RIGHTBUTTON, point.x, point.y,
- pWndPopupOwner);
- }
- void COutputReport::OnClear()
- {
- // TODO: Add your command handler code here
- ClearBuffer();
- }
- void COutputReport::OnHideReport()
- {
- // TODO: Add your command handler code here
- CWnd * pWnd = AfxGetMainWnd();
- if(pWnd)
- pWnd->SendMessage(WM_COMMAND,ID_VIEW_OUTPUT,0);
- }