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
TBGenWnd.cpp
Package: toolbar.rar [view]
Upload User: rundaa
Upload Date: 2009-05-24
Package Size: 44k
Code Size: 3k
Category:
CAD
Development Platform:
Visual C++
- // TBGenWnd.cpp : implementation file
- //
- #include "stdafx.h"
- #include "StdArx.h"
- #include "TBGenWnd.h"
- #include "Resource.h"
- #include "WindoTypeDlg.h"
- #include "WindoInfoDlg.h"
- #include "rxmfcapi.h"
- #include "gepnt2d.h"
- #ifdef _DEBUG
- #define new DEBUG_NEW
- #undef THIS_FILE
- static char THIS_FILE[] = __FILE__;
- #endif
- extern CWindoTypeDlg* g_pWindoTypeDlg;
- //extern HINSTANCE hResource;
- extern void drawWindo();
- /////////////////////////////////////////////////////////////////////////////
- // CTBGenWnd
- CTBGenWnd::CTBGenWnd()
- {
- }
- CTBGenWnd::~CTBGenWnd()
- {
- }
- BEGIN_MESSAGE_MAP(CTBGenWnd, CWnd)
- //{{AFX_MSG_MAP(CTBGenWnd)
- ON_COMMAND(ID_TBTN_WINDDLG, OnShowWindTypeDlg)
- ON_COMMAND(ID_TBTN_DRAW, OnDrawWindo)
- ON_COMMAND(ID_TBTN_INFO, OnWindInfoDlg)
- ON_WM_CLOSE()
- //}}AFX_MSG_MAP
- END_MESSAGE_MAP()
- /////////////////////////////////////////////////////////////////////////////
- // CTBGenWnd message handlers
- void CTBGenWnd::OnShowWindTypeDlg()
- {
- if(g_pWindoTypeDlg != NULL && !g_pWindoTypeDlg->IsWindowVisible())
- {
- g_pWindoTypeDlg->ShowWindow(SW_SHOW);
- }
- else if(g_pWindoTypeDlg != NULL)
- {
- g_pWindoTypeDlg->ShowWindow(SW_SHOW);
- }
- else
- {
- CAcModuleResourceOverride resOverride;
- g_pWindoTypeDlg = new CWindoTypeDlg(acedGetAcadFrame());
- g_pWindoTypeDlg->Create(IDD_WINDOTYPE, acedGetAcadFrame());
- g_pWindoTypeDlg->CenterWindow();
- g_pWindoTypeDlg->ShowWindow(SW_SHOW);
- ((CButton*) g_pWindoTypeDlg->GetDlgItem(IDC_CHK_VISTB))->SetCheck(1);
- g_pWindoTypeDlg->GetDlgItem(IDC_BTN_HIDEDLG)->EnableWindow(TRUE);
- }
- }
- void CTBGenWnd::OnDrawWindo()
- {
- if(g_pWindoTypeDlg != NULL)
- {
- g_pWindoTypeDlg->UpdateData(TRUE);
- // Transfer the values in the dialog
- // back to the global variables
- windInfo.m_dWindHt = g_pWindoTypeDlg->m_dHeight;
- windInfo.m_dWindWt = g_pWindoTypeDlg->m_dWidth;
- windInfo.m_nCols = g_pWindoTypeDlg->m_nCols;
- windInfo.m_nRows = g_pWindoTypeDlg->m_nRows;
- windInfo.m_nWindType = g_pWindoTypeDlg->m_nWindType;
- windInfo.m_startPt.x = g_pWindoTypeDlg->m_dXVal;
- windInfo.m_startPt.y = g_pWindoTypeDlg->m_dYVal;
- }
- drawWindo();
- }
- void CTBGenWnd::OnWindInfoDlg()
- {
- CAcModuleResourceOverride resOverride;
- CWindoInfoDlg dlg;
- dlg.DoModal();
- }
- void CTBGenWnd::OnClose()
- {
- // TODO: Add your message handler code here and/or call default
- CWnd::OnClose();
- }
- void CTBGenWnd::PostNcDestroy()
- {
- // TODO: Add your specialized code here and/or call the base class
- CWnd::PostNcDestroy();
- }