///////////////////////////////////////////////////////////////////////////// // Mockup5Dlg.h - Demonstrate displaying documents of various types, // // e.g., txt, doc, h, cpp, jpg, bmp, vsd. Uses browser // // control with very little design effort to accomplish // // rather sophisticated display operations. // // // // Language: Visual C++, ver 6.0, SP4 // // Platform: Dell XPS1000, Windows 2000 Professional, SP1 // // Application: Demonstration for Welch Allyn Project, also used as // // Demo for CSE691, and CSE784 Fall 2000 // // Author: Jim Fawcett, CST 2-187, Syracuse Univ, // // jfawcett@twcny.rr.com, (315) 443-3498 // ///////////////////////////////////////////////////////////////////////////// /* Module Operation ================ This project uses the Microsoft Browser Control, installed in all systems using Internet Explorer 4.0 or later. The function of the demo is to display any of the files of some selected type found in a fixed document directory. This directory is defined in Mockup5Dlg::OnInitDialog() in Mockup5Dlg.cpp. As of this version, the Directory is hardwired to c:\su\Welch Allyn\Mockup5\documents. For your own uses you will want to change that name to something suitable for you program. */ ///////////////////////////////////////////////////////////////////////////// // Build Process // ///////////////////////////////////////////////////////////////////////////// // You can recreate this project by taking the following steps: // // 1. Build a dialog-based application using the MFC Application Wizard. // // Make sure that the ActiveX controls option is selected at step 2. // // 2. On the menu Project\Add to Project\Components and Controls, pick // // Registered ActiveX Controls from the Gallery. // // 3. Select the Microsoft Browser Control. // // 4. With the Class Wizard declare a member variable: // // CWebBrowser2 m_browser // // 5. Use the invocation m_browser.Navigate(file,NULL,NULL,NULL,NULL); // // to display files as needed for your application. See my code, // // below, for a working example. // ///////////////////////////////////////////////////////////////////////////// // building from the command line: // // MSDEV mockup5.dsw /MAKE /REBUILD // ///////////////////////////////////////////////////////////////////////////// /* Maintenance History =================== ver 1.0 : 30 Oct 2000 - first release */ // // //{{AFX_INCLUDES() #include "webbrowser2.h" // this is where the action is //}}AFX_INCLUDES #if !defined(AFX_MOCKUP5DLG_H__ABB6175F_1E76_4280_8E2A_246C66B189CB__INCLUDED_) #define AFX_MOCKUP5DLG_H__ABB6175F_1E76_4280_8E2A_246C66B189CB__INCLUDED_ #if _MSC_VER > 1000 #pragma once #endif // _MSC_VER > 1000 //#include "stdAfx.h"; //#include ///////////////////////////////////////////////////////////////////////////// // CMockup5Dlg dialog class CMockup5Dlg : public CDialog { // Construction public: CMockup5Dlg(CWnd* pParent = NULL); // standard constructor // Dialog Data //{{AFX_DATA(CMockup5Dlg) enum { IDD = IDD_MOCKUP5_DIALOG }; //}}AFX_DATA // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CMockup5Dlg) protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL // Implementation // protected: HICON m_hIcon; // Generated message map functions //{{AFX_MSG(CMockup5Dlg) virtual BOOL OnInitDialog(); afx_msg void OnSysCommand(UINT nID, LPARAM lParam); afx_msg void OnPaint(); afx_msg HCURSOR OnQueryDragIcon(); afx_msg void OnBack(); afx_msg void OnForward(); afx_msg void OnSelchangeCombo1(); //}}AFX_MSG DECLARE_MESSAGE_MAP() private: CWebBrowser2 m_browser; // browser control does all the work CString *jpgArray; // array of filenames int jpgIndex; // current index into filename array int jpgMax; // number of filenames in array CComboBox m_CBcontrol; // place to store ext names for user to select CString m_CBstring; // current ext name }; //{{AFX_INSERT_LOCATION}} // Microsoft Visual C++ will insert additional declarations immediately before the previous line. #endif // !defined(AFX_MOCKUP5DLG_H__ABB6175F_1E76_4280_8E2A_246C66B189CB__INCLUDED_)