?? showipwnd.cpp
字號:
// showipwnd.cpp : implementation file
//
#include "stdafx.h"
#include "..\GameHigh.h"
#include "..\include\showipwnd.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.89\n位置:北京朝陽區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;
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -