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
XFloorPropertiesWndDesign.cpp
Package: propgrid.zip [view]
Upload User: yangzi5763
Upload Date: 2007-01-02
Package Size: 239k
Code Size: 4k
Category:
ActiveX-DCOM-ATL
Development Platform:
Visual C++
- /************************************
- REVISION LOG ENTRY
- Revision By: Mihai Filimon
- Revised on 10/14/98 12:03:03 PM
- Comments: XFloorPropertiesWndDesign.cpp: implementation of the CXFloorPropertiesWndDesign class.
- ************************************/
- #include "stdafx.h"
- #include "xpropertieswnd.h"
- #include "XFloorPropertiesWndDesign.h"
- #include "PageListCtrlDesign.h"
- #ifdef _DEBUG
- #undef THIS_FILE
- static char THIS_FILE[]=__FILE__;
- #define new DEBUG_NEW
- #endif
- //////////////////////////////////////////////////////////////////////
- // Construction/Destruction
- //////////////////////////////////////////////////////////////////////
- // Function name : CXFloorPropertiesWndDesign::CXFloorPropertiesWndDesign
- // Description : default contructor
- // Return type :
- CXFloorPropertiesWndDesign::CXFloorPropertiesWndDesign()
- {
- m_pOleDialog = NULL;
- }
- // Function name : CXFloorPropertiesWndDesign::~CXFloorPropertiesWndDesign
- // Description : virtual destructor
- // Return type :
- CXFloorPropertiesWndDesign::~CXFloorPropertiesWndDesign()
- {
- }
- // Function name : CXFloorPropertiesWndDesign::NewPageListCtrl
- // Description : Virtual function.This will return CPageListCtrlDesign* page
- // Return type : CPageListCtrl*
- // Argument : int nIndex
- CPageListCtrl* CXFloorPropertiesWndDesign::NewPageListCtrl(int nIndex, CXPropertiesWndCtrl* pControl, BOOL bGroup )
- {
- ASSERT (pControl == NULL);
- CPageListCtrlDesign* pPageListCtlrDesign = new CPageListCtrlDesign(m_pOleDialog);
- pPageListCtlrDesign->OnNew(this, nIndex + _nIDFirstListView);
- return pPageListCtlrDesign;
- }
- // Function name : CXFloorPropertiesWndDesign::DataExchange
- // Description : Called by CXPropertiesWndPropPage.DoDataExchange
- // Return type : void
- // Argument : CDataExchange * pDX
- void CXFloorPropertiesWndDesign::DataExchange(CDataExchange * pDX)
- {
- CString sPagesAndItems;
- if (pDX->m_bSaveAndValidate) Fill(sPagesAndItems);
- CXPropertiesWndPropPage* pParent = (CXPropertiesWndPropPage*)GetParent();
- DDP_DEFINE<CString>(pParent, pDX->m_bSaveAndValidate, &sPagesAndItems, _T("PagesAndItems"), VT_BSTR);
- if (!pDX->m_bSaveAndValidate) Load(sPagesAndItems);
- }
- // Function name : CXFloorPropertiesWndDesign::Fill
- // Description : Called by DataExhange to construct the sPagesItems string
- // stream will be the following form.
- // Page 1
- // {
- // NameEdit
- // NotesEdit
- // VisibleBoolComboBox
- // }
- // Page 2
- // {
- // ...
- // }
- //
- //
- //
- // Return type : void
- void CXFloorPropertiesWndDesign::Fill(CString& stream)
- {
- CString s(_cPagesSeparator);
- for (int i = 0; IsPage(i); i++)
- {
- CString sGroup(IsGroup(i) ? (LPCTSTR)CString(_T("[Group]") + s) : NULL);
- stream += GetPageName(i) + s + sGroup + _T("{") + s;
- GetListCtrl(i)->Save(stream);
- stream += _T("}") + s;
- }
- }
- // Function name : CXFloorPropertiesWndDesign::OnCommand
- // Description :
- // Return type : BOOL
- // Argument : WPARAM wParam
- // Argument : LPARAM lParam
- BOOL CXFloorPropertiesWndDesign::OnCommand( WPARAM wParam, LPARAM lParam )
- {
- CXPropertiesWndPropPage* pParent = (CXPropertiesWndPropPage*)GetParent();
- if (LOWORD(wParam) == (pParent)->m_edtRename.GetDlgCtrlID())
- if (HIWORD(wParam) == EN_KILLFOCUS)
- pParent->RenamePage(pParent->m_nRenamePage);
- return CXFloorPropertiesWnd::OnCommand(wParam, lParam);
- }
- // Function name : CXFloorPropertiesWndDesign::OnReset
- // Description : Called by load function
- // Return type : void
- void CXFloorPropertiesWndDesign::OnReset()
- {
- // just delete the old page
- while (DeletePage(0));
- }
- // Function name : CXFloorPropertiesWnd::OnDestructor
- // Description : This is called by ~CXFloorPropertiesWnd
- // Return type : void
- void CXFloorPropertiesWndDesign::OnDestructor()
- {
- for (int i = 0; i < m_arPagesListCtrl.GetSize(); i++)
- delete m_arPagesListCtrl[i];
- m_arPagesListCtrl.RemoveAll();
- }
- // Function name : CXFloorPropertiesWndDesign::SetOleDialog
- // Description : Set the parent of this class
- // Return type : void
- // Argument : COlePropertyPage *pOleDialog
- void CXFloorPropertiesWndDesign::SetOleDialog(COlePropertyPage *pOleDialog)
- {
- m_pOleDialog = pOleDialog;
- }