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: VC++视频传输.rar [view]
Upload User: hxb_1234
Upload Date: 2010-03-30
Package Size: 8328k
Code Size: 3k
Category:
Visual C++ Books
Development Platform:
Visual C++
- // mainfrm.cpp : implementation of the CMainFrame class
- //
- // This is a part of the Microsoft Foundation Classes C++ library.
- // Copyright (C) 1992-1998 Microsoft Corporation
- // All rights reserved.
- //
- // This source code is only intended as a supplement to the
- // Microsoft Foundation Classes Reference and related
- // electronic documentation provided with the library.
- // See these sources for detailed information regarding the
- // Microsoft Foundation Classes product.
- #include "stdafx.h"
- #include "RevPlayMDIChildWnd.h"
- #include "mdi.h"
- #include "mainfrm.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char BASED_CODE THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CMainFrame
- IMPLEMENT_DYNAMIC(CMainFrame, CMDIFrameWnd)
- BEGIN_MESSAGE_MAP(CMainFrame, CMDIFrameWnd)
- //{{AFX_MSG_MAP(CMainFrame)
- ON_COMMAND(IDM_REQUEST, OnRequest)
- ON_WM_CREATE()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CMainFrame construction/destruction
- static UINT indicators[] =
- {
- ID_SEPARATOR, // status line indicator
- ID_SEPARATOR,
- ID_SEPARATOR,
- ID_SEPARATOR,
- };
- CMainFrame::CMainFrame()
- {
- }
- CMainFrame::~CMainFrame()
- {
- }
- /////////////////////////////////////////////////////////////////////////////
- // CMainFrame commands
- static BOOL CALLBACK SendPrepareToClose(HWND hWnd, LPARAM)
- {
- CWnd* pWnd = CWnd::FromHandlePermanent(hWnd);
- if (pWnd != NULL)
- {
- pWnd->SendMessage(WM_USER_PREPARE_TO_CLOSE);
- if (pWnd->GetWindow(GW_CHILD) != NULL)
- ::EnumChildWindows(pWnd->m_hWnd, SendPrepareToClose, 0);
- }
- return TRUE;
- }
- BOOL CMainFrame::DestroyWindow()
- {
- ::EnumChildWindows(m_hWnd, SendPrepareToClose, 0);
- return CMDIFrameWnd::DestroyWindow();
- }
- void CMainFrame::OnRequest()
- {
- // TODO: Add your command handler code here
- RECT rect;
- CRevPlayMDIChildWnd *pRevPlayMDIChildWnd = new CRevPlayMDIChildWnd;
- GetClientRect(&rect);
- //调用子框架窗口的创建函数
- if (!pRevPlayMDIChildWnd->Create( _T("接收播放"),rect,this))
- return;
- }
- int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
- {
- if (CMDIFrameWnd::OnCreate(lpCreateStruct) == -1)
- return -1;
- // TODO: Add your specialized creation code here
- if (!m_wndStatusBar.Create(this,WS_CHILD|WS_VISIBLE|CBRS_BOTTOM,ID_STATUS_BAR)
- ||!m_wndStatusBar.SetIndicators(indicators,
- sizeof(indicators)/sizeof(UINT)))
- {
- TRACE0("Failed to create status barn");
- return -1; // fail to create
- }
- return 0;
- }