// Excel1Dlg.h : header file
//

#pragma once
#import "C:\\Program Files\\Common Files\\Microsoft Shared\\OFFICE11\\mso.dll" 
#import "C:\\Program Files\\Microsoft Office\\OFFICE11\\EXCEL.exe" rename("RGB", "ExcelRGB") rename("CopyFile", "ExcelCopyFile") rename("DialogBox", "ExcelDialogBox") rename_namespace("MSExcel") raw_interfaces_only  
#include "CApplication.h"
#include "CWorkbook.h"
#include "CWorkbooks.h"
#include "CWorksheet.h"
#include "CWorksheets.h"
#include "CRange.h"
#include "afxcmn.h"

// CExcel1Dlg dialog
class CExcel1Dlg : public CDialog
{
// Construction
public:
	CExcel1Dlg(CWnd* pParent = NULL);	// standard constructor

// Dialog Data
	enum { IDD = IDD_EXCEL1_DIALOG };

	protected:
	virtual void DoDataExchange(CDataExchange* pDX);	// DDX/DDV support


// Implementation
protected:
	HICON m_hIcon;

	// Generated message map functions
	virtual BOOL OnInitDialog();
	afx_msg void OnPaint();
	afx_msg HCURSOR OnQueryDragIcon();
	DECLARE_MESSAGE_MAP()
public:
    afx_msg void OnBnClickedButton1();

private:
    LPDISPATCH GetIDispatch(CString AppName);
    CApplication oExcel;
    CWorkbook oBook;
public:
    afx_msg void OnBnClickedButton2();
    afx_msg void OnBnClickedButton3();
    CTreeCtrl Tree1;
    afx_msg void OnBnClickedButton4();
    afx_msg void OnBnClickedButton5();
    afx_msg void OnBnClickedButton6();
};
