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
AnnuncePanel.cpp
Package: SwordOnline.rar [view]
Upload User: dzyhzl
Upload Date: 2019-04-29
Package Size: 56270k
Code Size: 3k
Category:
Game Server Simulator
Development Platform:
C/C++
- // AnnuncePanel.cpp : implementation file
- //
- #include "stdafx.h"
- #include "autoupdate.h"
- #include "AnnuncePanel.h"
- #include "AutoUpdateRes.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- BITMAP bmp_info;
- /////////////////////////////////////////////////////////////////////////////
- // AnnuncePanel dialog
- const CString Downloadurl = "http://www.jxonline.net/index/dl_up.shtml";
- AnnuncePanel::AnnuncePanel(CWnd* pParent /*=NULL*/)
- : CDialog(AnnuncePanel::IDD, pParent)
- {
- //{{AFX_DATA_INIT(AnnuncePanel)
- m_NoticeInfo = _T("系统检测到您的游戏版本太旧,以至无法完成自动升级。");
- m_NoticeInfo = m_NoticeInfo + 'n' + _T("您需要下载最新的升级包进行升级。");
- //}}AFX_DATA_INIT
- }
- void AnnuncePanel::DoDataExchange(CDataExchange* pDX)
- {
- CDialog::DoDataExchange(pDX);
- //{{AFX_DATA_MAP(AnnuncePanel)
- DDX_Text(pDX, IDC_NoticeInfo, m_NoticeInfo);
- //}}AFX_DATA_MAP
- }
- BEGIN_MESSAGE_MAP(AnnuncePanel, CDialog)
- //{{AFX_MSG_MAP(AnnuncePanel)
- ON_BN_CLICKED(IDC_BUTTON1, OnCancel)
- ON_WM_PAINT()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // AnnuncePanel message handlers
- void AnnuncePanel::OnOK()
- {
- // TODO: Add extra validation here
- ShellExecute(NULL,"open",Downloadurl,NULL,NULL,SW_SHOW);
- CDialog::OnOK();
- }
- void AnnuncePanel::OnCancel()
- {
- // TODO: Add your control notification handler code here
- CDialog::OnCancel();
- }
- BOOL AnnuncePanel::OnInitDialog()
- {
- CDialog::OnInitDialog();
- // TODO: Add extra initialization here
- m_hIcon = AfxGetApp()->LoadIcon(IDR_MAINFRAME);
- HBITMAP TempBitMap = LoadBitmap(m_ResModule, MAKEINTRESOURCE(IDB_TITLE));
- if(!m_bmTitle.Attach(TempBitMap)) {
- }
- // LoadBitMapFromInstance(m_bmTitle, m_ResModule, IDB_TITLE);
- SetIcon(m_hIcon, TRUE); // Set big icon
- SetIcon(m_hIcon, FALSE); // Set small icon
- if (!((HBITMAP)m_bmTitle))
- {
- return 0;
- }
- m_bmTitle.GetBitmap(&bmp_info);
- CRect WindowRange(0,0, bmp_info.bmWidth - 60, 400);
- MoveWindow(WindowRange);
- CenterWindow(NULL);
- return TRUE; // return TRUE unless you set the focus to a control
- // EXCEPTION: OCX Property Pages should return FALSE
- }
- void AnnuncePanel::OnPaint()
- {
- // CPaintDC dc(this); // device context for painting
- CPaintDC PaintDC(this);
- if (IsIconic())
- {
- }
- else
- {
- //CDialog::OnPaint();
- //画标题
- CDC dc;
- CBitmap *pOldBitmap = NULL;
- dc.CreateCompatibleDC(&PaintDC);
- pOldBitmap = dc.SelectObject(&m_bmTitle);
- PaintDC.BitBlt(0, 0, bmp_info.bmWidth, bmp_info.bmHeight, &dc, 30, 0, SRCCOPY);
- dc.SelectObject(pOldBitmap);
- }
- // TODO: Add your message handler code here
- // Do not call CDialog::OnPaint() for painting messages
- }