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
tableframe.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++
- // tableframe.cpp : implementation file
- //
- #include "stdafx.h"
- #include "..gamehigh.h"
- #include "..includetableframe.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- /////////////////////////////////////////////////////////////////////////////
- // CTableFrame
- CTableFrame::CTableFrame(CWnd* pWnd, RECT rcWnd)
- {
- pChatView =NULL;
- pTableView =NULL;
- pUserListView =NULL;
- try
- {
- Create(NULL, "",
- WS_CHILD | WS_VISIBLE, rcWnd, pWnd, 0, NULL);
- }
- catch(...)
- {
- ::AfxMessageBox("无法创建桌子列表窗口", MB_OK | MB_ICONERROR);
- }
- }
- CTableFrame::~CTableFrame()
- {
- }
- BEGIN_MESSAGE_MAP(CTableFrame, CFrameWnd)
- //{{AFX_MSG_MAP(CTableFrame)
- ON_WM_ERASEBKGND()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CTableFrame message handlers
- BOOL CTableFrame::OnCreateClient(LPCREATESTRUCT lpcs, CCreateContext* pContext)
- {
- if (NULL == m_wndSplitter.CreateStatic(this, 1, 2))
- return FALSE;
- m_wndSplitter.CreateView(0, 0, //设置TreeView
- RUNTIME_CLASS(CTableView),
- CSize(600,600),
- pContext);
- RECT rect;
- memset(&rect, 0, sizeof(RECT));
- this->GetClientRect(&rect);
- //拆分右边的栏
- if(NULL == m_wndRightSplitter.CreateStatic(&m_wndSplitter,
- 2, 1,
- WS_CHILD|WS_VISIBLE,
- m_wndSplitter.IdFromRowCol(0, 1)))
- return FALSE;
- m_wndRightSplitter.CreateView(0, 0, RUNTIME_CLASS(CUserListView),
- CSize(250,500), pContext);
- m_wndRightSplitter.CreateView(1, 0, RUNTIME_CLASS(CChatView),
- CSize(250,100), pContext);
- SetActiveView((CView*)m_wndSplitter.GetPane(0,0));
- pTableView =(CTableView*)m_wndSplitter.GetPane(0, 0);
- pUserListView =(CUserListView*)m_wndRightSplitter.GetPane(0, 0);
- pChatView =(CChatView*)m_wndRightSplitter.GetPane(1, 0);
- return TRUE;
- }
- void CTableFrame::SetRoomID(DWORD dwRoomID)
- {
- SAFE_CHECKWND(pTableView)
- {
- CTablePage* pPage =pTableView->GetTablePage();
- SAFE_CHECKWND(pPage)
- {
- pPage->SetRoomID(dwRoomID);
- }
- }
- }
- BOOL CTableFrame::OnEraseBkgnd(CDC* pDC)
- {
- return TRUE;
- }