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
showipwnd.cpp
Package: 1731.rar [view]
Upload User: swkcbjrc
Upload Date: 2016-04-02
Package Size: 45277k
Code Size: 2k
Category:
Game Program
Development Platform:
Visual C++
- // showipwnd.cpp : implementation file
- //
- #include "stdafx.h"
- #include "..GameHigh.h"
- #include "..includeshowipwnd.h"
- #include "baseFunction.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CShowIpWnd
- CShowIpWnd::CShowIpWnd()
- {
- }
- CShowIpWnd::~CShowIpWnd()
- {
- }
- BEGIN_MESSAGE_MAP(CShowIpWnd, CWnd)
- //{{AFX_MSG_MAP(CShowIpWnd)
- ON_WM_PAINT()
- ON_WM_ERASEBKGND()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CShowIpWnd message handlers
- void CShowIpWnd::OnPaint()
- {
- CPaintDC dc(this); // device context for painting
- CBrush m_Brush;
- COLORREF clrBk =RGB(124, 176, 201);
- m_Brush.CreateSolidBrush(clrBk);
- RECT rect;
- memset(&rect, 0, sizeof(RECT));
- this->GetClientRect(&rect);
- dc.FillRect(&rect, &m_Brush);
- m_Brush.DeleteObject();
- LOGBRUSH lb;
- memset(&lb, 0, sizeof(LOGBRUSH));
- lb.lbColor =RGB(7, 47, 136);
- lb.lbStyle =BS_NULL;
- m_Brush.CreateBrushIndirect(&lb);
- CBrush* pOldBrush =(CBrush*)dc.SelectObject(&m_Brush);
- CPen m_Pen;
- m_Pen.CreatePen(PS_SOLID, 3, RGB(7,47, 136));
- CPen* pOldPen =(CPen*)dc.SelectObject(&m_Pen);
- memset(&rect, 0, sizeof(RECT));
- this->GetClientRect(&rect);
- rect.left +=2;
- rect.top +=1;
- rect.right -=1;
- rect.bottom -=1;
- dc.Rectangle(&rect);
- dc.SelectObject(pOldBrush);
- dc.SelectObject(pOldPen);
- m_Pen.DeleteObject();
- m_Brush.DeleteObject();
- HFONT hFont =NULL;
- if(IsWin9x())
- {
- hFont=::CreateFont(15,0,0,0,FW_BOLD,0,0,0,0,0,0,0,0,"");
- }
- else
- {
- hFont=::CreateFont(14,0,0,0,FW_BOLD,0,0,0,0,0,0,0,0,"");
- }
- HFONT hOldFont =(HFONT)::SelectObject(dc.GetSafeHdc(), hFont);
- dc.SetBkMode(TRANSPARENT);
- dc.SetTextColor(RGB(79, 80, 80));
- char buffer[256];
- memset(buffer, 0, sizeof(char) * 256);
- wsprintf(buffer, "IP : 202.183.173.89n位置:北京朝阳区Game High网吧");
- memset(&rect, 0, sizeof(RECT));
- this->GetClientRect(&rect);
- rect.top +=10;
- rect.left +=10;
- dc.DrawText(buffer, strlen(buffer), &rect, DT_VCENTER | DT_WORDBREAK);
- ::SelectObject(dc.GetSafeHdc(), hOldFont);
- ::DeleteObject(hFont);
- hFont =NULL;
- }
- BOOL CShowIpWnd::OnEraseBkgnd(CDC* pDC)
- {
- return TRUE;
- }