- 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
WIZARD.CPP
Package: MSDN_VC98.zip [view]
Upload User: bangxh
Upload Date: 2007-01-31
Package Size: 42235k
Code Size: 3k
Category:
Windows Develop
Development Platform:
Visual C++
- //-----------------------------------------------------------------------------
- // Microsoft OLE DB TABLECOPY Sample
- // Copyright (C) 1995-1998 Microsoft Corporation
- //
- // @doc
- //
- // @module WIZARD.CPP
- //
- //-----------------------------------------------------------------------------
- /////////////////////////////////////////////////////////////////
- // Includes
- //
- /////////////////////////////////////////////////////////////////
- #include "common.h"
- #include "tablecopy.h"
- #include "wizard.h"
- #include "progress.h"
- /////////////////////////////////////////////////////////////////////
- // CDialogBase::CDialogBase
- //
- /////////////////////////////////////////////////////////////////////
- CDialogBase::CDialogBase(HWND hWnd, HINSTANCE hInst)
- {
- ASSERT(hInst);
- m_hWnd = hWnd;
- m_hInst = hInst;
- }
- /////////////////////////////////////////////////////////////////////
- // CDialogBase::~CDialogBase
- //
- /////////////////////////////////////////////////////////////////////
- CDialogBase::~CDialogBase()
- {
- Destroy();
- }
- /////////////////////////////////////////////////////////////////////
- // ULONG CDialogBase::Destroy
- //
- /////////////////////////////////////////////////////////////////////
- ULONG CDialogBase::Destroy()
- {
- if(m_hWnd)
- {
- EndDialog(m_hWnd, 0);
- m_hWnd = NULL;
- }
- return 0;
- }
- ////////////////////////////////////////////////////////////////
- // CWizard::CWizard
- //
- /////////////////////////////////////////////////////////////////
- CWizard::CWizard(HWND hWnd, HINSTANCE hInst)
- : CDialogBase(hWnd, hInst)
- {
- m_pCTableCopy = new CTableCopy(this);
- m_pCProgress = new CProgress(hWnd, hInst);
- m_iPrevStep = WIZ_STEP1;
- m_rgDialogSteps[WIZ_STEP1] = new CS1Dialog(hWnd, hInst, m_pCTableCopy);
- m_rgDialogSteps[WIZ_STEP2] = new CS2Dialog(hWnd, hInst, m_pCTableCopy);
- m_rgDialogSteps[WIZ_STEP3] = new CS3Dialog(hWnd, hInst, m_pCTableCopy);
- m_rgDialogSteps[WIZ_STEP4] = new CS4Dialog(hWnd, hInst, m_pCTableCopy);
- m_rgDialogSteps[WIZ_TYPES] = new CTypesDialog(hWnd, hInst, m_pCTableCopy);
- }
- ////////////////////////////////////////////////////////////////
- // CWizard::~CWizard
- //
- /////////////////////////////////////////////////////////////////
- CWizard::~CWizard()
- {
- delete m_pCTableCopy;
- delete m_pCProgress;
- delete m_rgDialogSteps[WIZ_STEP1];
- delete m_rgDialogSteps[WIZ_STEP2];
- delete m_rgDialogSteps[WIZ_STEP3];
- delete m_rgDialogSteps[WIZ_STEP4];
- delete m_rgDialogSteps[WIZ_TYPES];
- }
- ////////////////////////////////////////////////////////////////
- // CWizard::Display
- //
- /////////////////////////////////////////////////////////////////
- ULONG CWizard::Display()
- {
- return DisplayStep(WIZ_STEP1);
- }
- ////////////////////////////////////////////////////////////////
- // ULONG CWizard::DisplayStep
- //
- /////////////////////////////////////////////////////////////////
- ULONG CWizard::DisplayStep(ULONG iStep)
- {
- ASSERT(iStep >= WIZ_STEP1 && iStep < END_WIZ);
- return m_rgDialogSteps[iStep]->Display();
- }
- ////////////////////////////////////////////////////////////////
- // ULONG CWizard::DestroyPrevStep
- //
- /////////////////////////////////////////////////////////////////
- ULONG CWizard::DestroyPrevStep(ULONG iCurStep)
- {
- if(iCurStep != m_iPrevStep)
- m_rgDialogSteps[m_iPrevStep]->Destroy();
- m_iPrevStep = iCurStep;
- return 0;
- }