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
MainFrm.cpp
Package: qzoomview.zip [view]
Upload User: xp9161
Upload Date: 2009-12-21
Package Size: 70k
Code Size: 2k
Category:
Windows Develop
Development Platform:
Visual C++
- // MainFrm.cpp : implementation of the CMainFrame class
- //
- #include "stdafx.h"
- #include "QZoomViewDemo.h"
- #include "MainFrm.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #endif
- const int TimerID = 3;
- const int TimerPeriod = 4000;
- const int FirstMessage = 1000;
- IMPLEMENT_DYNCREATE(CMainFrame, CFrameWnd)
- BEGIN_MESSAGE_MAP(CMainFrame, CFrameWnd)
- ON_WM_CREATE()
- ON_WM_TIMER()
- ON_WM_DESTROY()
- END_MESSAGE_MAP()
- static UINT indicators[] =
- {
- ID_SEPARATOR, // status line indicator
- //++++++++++++++++++++++++++++++++++
- // One indicator ID added.
- // It is handled in class QZVDemoView.
- ID_INDICATOR_ZOOM,
- //
- //
- //+++++++++++++++++++++++++++++++++
- ID_INDICATOR_CAPS,
- ID_INDICATOR_NUM,
- ID_INDICATOR_SCRL,
- };
- CMainFrame::CMainFrame()
- : m_iMessage(FirstMessage)
- {
- }
- CMainFrame::~CMainFrame()
- {
- }
- int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
- {
- if (CFrameWnd::OnCreate(lpCreateStruct) == -1)
- return -1;
- if (!m_wndToolBar.CreateEx(this, TBSTYLE_FLAT, WS_CHILD | WS_VISIBLE | CBRS_TOP
- | CBRS_GRIPPER | CBRS_TOOLTIPS | CBRS_FLYBY | CBRS_SIZE_DYNAMIC) ||
- !m_wndToolBar.LoadToolBar(IDR_MAINFRAME))
- {
- TRACE0("Failed to create toolbarn");
- return -1;
- }
- if (!m_wndStatusBar.Create(this) ||
- !m_wndStatusBar.SetIndicators(indicators,
- sizeof(indicators)/sizeof(UINT)))
- {
- TRACE0("Failed to create status barn");
- return -1;
- }
- m_wndToolBar.EnableDocking(CBRS_ALIGN_ANY);
- EnableDocking(CBRS_ALIGN_ANY);
- DockControlBar(&m_wndToolBar);
- SetTimer(TimerID, TimerPeriod, NULL);
- return 0;
- }
- void CMainFrame::OnTimer(UINT nIDEvent)
- {
- if (nIDEvent == TimerID)
- {
- CString s;
- if (! s.LoadString(m_iMessage++))
- {
- m_iMessage = FirstMessage;
- s.LoadString(m_iMessage++);
- }
- SetMessageText(s);
- }
- CFrameWnd::OnTimer(nIDEvent);
- }
- void CMainFrame::OnDestroy()
- {
- CFrameWnd::OnDestroy();
- KillTimer(TimerPeriod);
- }