需下载msSoapToolkit20.exe
引用
#import "msxml3.dll"
using namespace MSXML2;
#import "C:/Program Files/Common Files/MSSoap/Binaries/mssoap1.dll" exclude("IStream", "ISequentialStream", "_LARGE_INTEGER", "_ULARGE_INTEGER", "tagSTATSTG", "_FILETIME") raw_interfaces_only
using namespace MSSOAPLib;
例程:
新建工程àMFC AppWizard(exe)[ Mclient]àstep1à基本对话à其他默认值即可
修改源文件:
< StdAfx.h>
// stdafx.h : include file for standard system include files,
// or project specific include files that are used frequently, but
// are changed infrequently
//
#if !defined(AFX_STDAFX_H__045CD307_9518_4AF1_8CE3_8FFE38D1ACB2__INCLUDED_)
#define AFX_STDAFX_H__045CD307_9518_4AF1_8CE3_8FFE38D1ACB2__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#define VC_EXTRALEAN // Exclude rarely-used stuff from Windows headers
#include <afxwin.h> // MFC core and standard components
#include <afxext.h> // MFC extensions
#include <afxdisp.h> // MFC Automation classes
#include <afxdtctl.h> // MFC support for Internet Explorer 4 Common Controls
#ifndef _AFX_NO_AFXCMN_SUPPORT
#include <afxcmn.h> // MFC support for Windows Common Controls
#endif // _AFX_NO_AFXCMN_SUPPORT
#import "msxml3.dll"
using namespace MSXML2;
#import "C:/Program Files/Common Files/MSSoap/Binaries/mssoap1.dll" exclude("IStream", "ISequentialStream", "_LARGE_INTEGER", "_ULARGE_INTEGER", "tagSTATSTG", "_FILETIME") raw_interfaces_only
using namespace MSSOAPLib;
#define MSG(message) /
{ /
::MessageBox(NULL,_T(message),NULL,MB_OK | MB_ICONEXCLAMATION| MB_APPLMODAL);/
goto cleanup; /
}
#define CHECK_HRESULT(hr, message) /
if (FAILED(hr)) /
{ /
MSG(message); /
}
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include ''stdafx.h'' before including this file for PCH
#endif
#include "resource.h" // main symbols
/
// CMClientApp:
// See MClient.cpp for the implementation of this class
//
class CMClientApp : public CWinApp
{
public:
CMClientApp();
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__045CD307_9518_4AF1_8CE3_8FFE38D1ACB2__INCLUDED_)
<MClient.h>
// MClient.h : main header file for the MCLIENT application
//
#if !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
#define AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include ''stdafx.h'' before including this file for PCH
#endif
#include "resource.h" // main symbols
/
// CMClientApp:
// See MClient.cpp for the implementation of this class
//
class CMClientApp : public CWinApp
{
public:
CMClientApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CMClientApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if !defined(AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_)
#define AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/
// CMClientDlg dialog
class CMClientDlg : public CDialog
{
// Construction
public:
void EnableButtons();
void DisableButtons();
void AssignpRef(VARIANT *var1, VARIANT *var2);
void assignItem(LVITEM *item, UINT mask, int iItem, int iSubItem, LPTSTR pszText, int cchTextMax);
int UpdateList();
bool DestroyTree();
int CheckforURL();
int ModifyDialog();
void Execute();
int nCountParameter();
HTREEITEM AddtoTree(HTREEITEM hParent, HTREEITEM hInsertAfter, LPTSTR pszData, UINT mask, IUnknown * theInterface);
CMClientDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMClientDlg)
enum { IDD = IDD_MCLIENT_DIALOG };
CTreeCtrl m_TreeCtrl;
CListCtrl m_Parameters;
CString m_strParameter;
CString m_strURL;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__045CD307_9518_4AF1_8CE3_8FFE38D1ACB2__INCLUDED_)
<MClient.h>
// MClient.h : main header file for the MCLIENT application
//
#if !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
#define AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include ''stdafx.h'' before including this file for PCH
#endif
#include "resource.h" // main symbols
/
// CMClientApp:
// See MClient.cpp for the implementation of this class
//
class CMClientApp : public CWinApp
{
public:
CMClientApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CMClientApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if !defined(AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_)
#define AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/
// CMClientDlg dialog
class CMClientDlg : public CDialog
{
// Construction
public:
void EnableButtons();
void DisableButtons();
void AssignpRef(VARIANT *var1, VARIANT *var2);
void assignItem(LVITEM *item, UINT mask, int iItem, int iSubItem, LPTSTR pszText, int cchTextMax);
int UpdateList();
bool DestroyTree();
int CheckforURL();
int ModifyDialog();
void Execute();
int nCountParameter();
HTREEITEM AddtoTree(HTREEITEM hParent, HTREEITEM hInsertAfter, LPTSTR pszData, UINT mask, IUnknown * theInterface);
CMClientDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMClientDlg)
enum { IDD = IDD_MCLIENT_DIALOG };
CTreeCtrl m_TreeCtrl;
CListCtrl m_Parameters;
CString m_strParameter;
CString m_strURL;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if !defined(AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_)
#define AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/
// CMClientDlg dialog
class CMClientDlg : public CDialog
{
// Construction
public:
void EnableButtons();
void DisableButtons();
void AssignpRef(VARIANT *var1, VARIANT *var2);
void assignItem(LVITEM *item, UINT mask, int iItem, int iSubItem, LPTSTR pszText, int cchTextMax);
int UpdateList();
bool DestroyTree();
int CheckforURL();
int ModifyDialog();
void Execute();
int nCountParameter();
HTREEITEM AddtoTree(HTREEITEM hParent, HTREEITEM hInsertAfter, LPTSTR pszData, UINT mask, IUnknown * theInterface);
CMClientDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMClientDlg)
enum { IDD = IDD_MCLIENT_DIALOG };
CTreeCtrl m_TreeCtrl;
CListCtrl m_Parameters;
CString m_strParameter;
CString m_strURL;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
//{{AFX_MSG(CMClientDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnBrowse();
afx_msg void OnClose();
afx_msg void OnEdit();
afx_msg void OnExecute();
afx_msg void OnDeleteitemListparam(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDeleteitemTree(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnSelchangedTree(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnLoad();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_)
< resource.h>
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by MClient.rc
//
#define IDD_MCLIENT_DIALOG 102
#define IDR_MAINFRAME 128
#define IDC_URL 1000
#define IDLOAD 1001
#define IDBROWSE 1002
#define IDC_TREE 1003
#define IDC_LISTPARAM 1004
#define IDC_PARAMETER 1005
#define IDC_EDIT 1006
#define IDC_EXECUTE 1007
#define IDC_CLOSE 1008
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1009
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
<StdAfx.cpp>
// stdafx.cpp : source file that includes just the standard includes
// MClient.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
< MClient.cpp>
// MClient.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "MClient.h"
#include "MClientDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/
// CMClientApp
BEGIN_MESSAGE_MAP(CMClientApp, CWinApp)
//{{AFX_MSG_MAP(CMClientApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/
// CMClientApp construction
CMClientApp::CMClientApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/
// The one and only CMClientApp object
CMClientApp theApp;
/
// CMClientApp initialization
BOOL CMClientApp::InitInstance()
{
if (FAILED(::CoInitialize(NULL)))
{
return FALSE;
}
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CMClientDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
::CoUninitialize();
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application''s message pump.
return FALSE;
}
#define CHECK_HRESULT(hr, message) /
if (FAILED(hr)) /
{ /
MSG(message); /
}
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include ''stdafx.h'' before including this file for PCH
#endif
#include "resource.h" // main symbols
/
// CMClientApp:
// See MClient.cpp for the implementation of this class
//
class CMClientApp : public CWinApp
{
public:
CMClientApp();
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__045CD307_9518_4AF1_8CE3_8FFE38D1ACB2__INCLUDED_)
<MClient.h>
// MClient.h : main header file for the MCLIENT application
//
#if !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
#define AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include ''stdafx.h'' before including this file for PCH
#endif
#include "resource.h" // main symbols
/
// CMClientApp:
// See MClient.cpp for the implementation of this class
//
class CMClientApp : public CWinApp
{
public:
CMClientApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CMClientApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if !defined(AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_)
#define AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/
// CMClientDlg dialog
class CMClientDlg : public CDialog
{
// Construction
public:
void EnableButtons();
void DisableButtons();
void AssignpRef(VARIANT *var1, VARIANT *var2);
void assignItem(LVITEM *item, UINT mask, int iItem, int iSubItem, LPTSTR pszText, int cchTextMax);
int UpdateList();
bool DestroyTree();
int CheckforURL();
int ModifyDialog();
void Execute();
int nCountParameter();
HTREEITEM AddtoTree(HTREEITEM hParent, HTREEITEM hInsertAfter, LPTSTR pszData, UINT mask, IUnknown * theInterface);
CMClientDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMClientDlg)
enum { IDD = IDD_MCLIENT_DIALOG };
CTreeCtrl m_TreeCtrl;
CListCtrl m_Parameters;
CString m_strParameter;
CString m_strURL;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__045CD307_9518_4AF1_8CE3_8FFE38D1ACB2__INCLUDED_)
<MClient.h>
// MClient.h : main header file for the MCLIENT application
//
#if !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
#define AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include ''stdafx.h'' before including this file for PCH
#endif
#include "resource.h" // main symbols
/
// CMClientApp:
// See MClient.cpp for the implementation of this class
//
class CMClientApp : public CWinApp
{
public:
CMClientApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CMClientApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if !defined(AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_)
#define AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/
// CMClientDlg dialog
class CMClientDlg : public CDialog
{
// Construction
public:
void EnableButtons();
void DisableButtons();
void AssignpRef(VARIANT *var1, VARIANT *var2);
void assignItem(LVITEM *item, UINT mask, int iItem, int iSubItem, LPTSTR pszText, int cchTextMax);
int UpdateList();
bool DestroyTree();
int CheckforURL();
int ModifyDialog();
void Execute();
int nCountParameter();
HTREEITEM AddtoTree(HTREEITEM hParent, HTREEITEM hInsertAfter, LPTSTR pszData, UINT mask, IUnknown * theInterface);
CMClientDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMClientDlg)
enum { IDD = IDD_MCLIENT_DIALOG };
CTreeCtrl m_TreeCtrl;
CListCtrl m_Parameters;
CString m_strParameter;
CString m_strURL;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if !defined(AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_)
#define AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/
// CMClientDlg dialog
class CMClientDlg : public CDialog
{
// Construction
public:
void EnableButtons();
void DisableButtons();
void AssignpRef(VARIANT *var1, VARIANT *var2);
void assignItem(LVITEM *item, UINT mask, int iItem, int iSubItem, LPTSTR pszText, int cchTextMax);
int UpdateList();
bool DestroyTree();
int CheckforURL();
int ModifyDialog();
void Execute();
int nCountParameter();
HTREEITEM AddtoTree(HTREEITEM hParent, HTREEITEM hInsertAfter, LPTSTR pszData, UINT mask, IUnknown * theInterface);
CMClientDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMClientDlg)
enum { IDD = IDD_MCLIENT_DIALOG };
CTreeCtrl m_TreeCtrl;
CListCtrl m_Parameters;
CString m_strParameter;
CString m_strURL;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
//{{AFX_MSG(CMClientDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnBrowse();
afx_msg void OnClose();
afx_msg void OnEdit();
afx_msg void OnExecute();
afx_msg void OnDeleteitemListparam(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDeleteitemTree(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnSelchangedTree(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnLoad();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_)
< resource.h>
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by MClient.rc
//
#define IDD_MCLIENT_DIALOG 102
#define IDR_MAINFRAME 128
#define IDC_URL 1000
#define IDLOAD 1001
#define IDBROWSE 1002
#define IDC_TREE 1003
#define IDC_LISTPARAM 1004
#define IDC_PARAMETER 1005
#define IDC_EDIT 1006
#define IDC_EXECUTE 1007
#define IDC_CLOSE 1008
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1009
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
<StdAfx.cpp>
// stdafx.cpp : source file that includes just the standard includes
// MClient.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
< MClient.cpp>
// MClient.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "MClient.h"
#include "MClientDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/
// CMClientApp
BEGIN_MESSAGE_MAP(CMClientApp, CWinApp)
//{{AFX_MSG_MAP(CMClientApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/
// CMClientApp construction
CMClientApp::CMClientApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/
// The one and only CMClientApp object
CMClientApp theApp;
/
// CMClientApp initialization
BOOL CMClientApp::InitInstance()
{
if (FAILED(::CoInitialize(NULL)))
{
return FALSE;
}
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CMClientDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
::CoUninitialize();
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application''s message pump.
return FALSE;
}
#define CHECK_HRESULT(hr, message) /
if (FAILED(hr)) /
{ /
MSG(message); /
}
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include ''stdafx.h'' before including this file for PCH
#endif
#include "resource.h" // main symbols
/
// CMClientApp:
// See MClient.cpp for the implementation of this class
//
class CMClientApp : public CWinApp
{
public:
CMClientApp();
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__045CD307_9518_4AF1_8CE3_8FFE38D1ACB2__INCLUDED_)
<MClient.h>
// MClient.h : main header file for the MCLIENT application
//
#if !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
#define AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include ''stdafx.h'' before including this file for PCH
#endif
#include "resource.h" // main symbols
/
// CMClientApp:
// See MClient.cpp for the implementation of this class
//
class CMClientApp : public CWinApp
{
public:
CMClientApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CMClientApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if !defined(AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_)
#define AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/
// CMClientDlg dialog
class CMClientDlg : public CDialog
{
// Construction
public:
void EnableButtons();
void DisableButtons();
void AssignpRef(VARIANT *var1, VARIANT *var2);
void assignItem(LVITEM *item, UINT mask, int iItem, int iSubItem, LPTSTR pszText, int cchTextMax);
int UpdateList();
bool DestroyTree();
int CheckforURL();
int ModifyDialog();
void Execute();
int nCountParameter();
HTREEITEM AddtoTree(HTREEITEM hParent, HTREEITEM hInsertAfter, LPTSTR pszData, UINT mask, IUnknown * theInterface);
CMClientDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMClientDlg)
enum { IDD = IDD_MCLIENT_DIALOG };
CTreeCtrl m_TreeCtrl;
CListCtrl m_Parameters;
CString m_strParameter;
CString m_strURL;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_STDAFX_H__045CD307_9518_4AF1_8CE3_8FFE38D1ACB2__INCLUDED_)
<MClient.h>
// MClient.h : main header file for the MCLIENT application
//
#if !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
#define AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
#ifndef __AFXWIN_H__
#error include ''stdafx.h'' before including this file for PCH
#endif
#include "resource.h" // main symbols
/
// CMClientApp:
// See MClient.cpp for the implementation of this class
//
class CMClientApp : public CWinApp
{
public:
CMClientApp();
// Overrides
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientApp)
public:
virtual BOOL InitInstance();
//}}AFX_VIRTUAL
// Implementation
//{{AFX_MSG(CMClientApp)
// NOTE - the ClassWizard will add and remove member functions here.
// DO NOT EDIT what you see in these blocks of generated code !
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if !defined(AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_)
#define AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/
// CMClientDlg dialog
class CMClientDlg : public CDialog
{
// Construction
public:
void EnableButtons();
void DisableButtons();
void AssignpRef(VARIANT *var1, VARIANT *var2);
void assignItem(LVITEM *item, UINT mask, int iItem, int iSubItem, LPTSTR pszText, int cchTextMax);
int UpdateList();
bool DestroyTree();
int CheckforURL();
int ModifyDialog();
void Execute();
int nCountParameter();
HTREEITEM AddtoTree(HTREEITEM hParent, HTREEITEM hInsertAfter, LPTSTR pszData, UINT mask, IUnknown * theInterface);
CMClientDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMClientDlg)
enum { IDD = IDD_MCLIENT_DIALOG };
CTreeCtrl m_TreeCtrl;
CListCtrl m_Parameters;
CString m_strParameter;
CString m_strURL;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MCLIENT_H__9A397DA6_5A62_4AEF_BE5E_6C7629322ECC__INCLUDED_)
<MClientDlg.h>
// MClientDlg.h : header file
//
#if !defined(AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_)
#define AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_
#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000
/
// CMClientDlg dialog
class CMClientDlg : public CDialog
{
// Construction
public:
void EnableButtons();
void DisableButtons();
void AssignpRef(VARIANT *var1, VARIANT *var2);
void assignItem(LVITEM *item, UINT mask, int iItem, int iSubItem, LPTSTR pszText, int cchTextMax);
int UpdateList();
bool DestroyTree();
int CheckforURL();
int ModifyDialog();
void Execute();
int nCountParameter();
HTREEITEM AddtoTree(HTREEITEM hParent, HTREEITEM hInsertAfter, LPTSTR pszData, UINT mask, IUnknown * theInterface);
CMClientDlg(CWnd* pParent = NULL); // standard constructor
// Dialog Data
//{{AFX_DATA(CMClientDlg)
enum { IDD = IDD_MCLIENT_DIALOG };
CTreeCtrl m_TreeCtrl;
CListCtrl m_Parameters;
CString m_strParameter;
CString m_strURL;
//}}AFX_DATA
// ClassWizard generated virtual function overrides
//{{AFX_VIRTUAL(CMClientDlg)
protected:
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
//}}AFX_VIRTUAL
// Implementation
protected:
HICON m_hIcon;
//{{AFX_MSG(CMClientDlg)
virtual BOOL OnInitDialog();
afx_msg void OnPaint();
afx_msg HCURSOR OnQueryDragIcon();
afx_msg void OnBrowse();
afx_msg void OnClose();
afx_msg void OnEdit();
afx_msg void OnExecute();
afx_msg void OnDeleteitemListparam(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnDeleteitemTree(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnSelchangedTree(NMHDR* pNMHDR, LRESULT* pResult);
afx_msg void OnLoad();
//}}AFX_MSG
DECLARE_MESSAGE_MAP()
};
//{{AFX_INSERT_LOCATION}}
// Microsoft Visual C++ will insert additional declarations immediately before the previous line.
#endif // !defined(AFX_MCLIENTDLG_H__C2D8DBC4_30FE_40DD_848C_78D5834CAD07__INCLUDED_)
< resource.h>
//{{NO_DEPENDENCIES}}
// Microsoft Developer Studio generated include file.
// Used by MClient.rc
//
#define IDD_MCLIENT_DIALOG 102
#define IDR_MAINFRAME 128
#define IDC_URL 1000
#define IDLOAD 1001
#define IDBROWSE 1002
#define IDC_TREE 1003
#define IDC_LISTPARAM 1004
#define IDC_PARAMETER 1005
#define IDC_EDIT 1006
#define IDC_EXECUTE 1007
#define IDC_CLOSE 1008
// Next default values for new objects
//
#ifdef APSTUDIO_INVOKED
#ifndef APSTUDIO_READONLY_SYMBOLS
#define _APS_NEXT_RESOURCE_VALUE 129
#define _APS_NEXT_COMMAND_VALUE 32771
#define _APS_NEXT_CONTROL_VALUE 1009
#define _APS_NEXT_SYMED_VALUE 101
#endif
#endif
<StdAfx.cpp>
// stdafx.cpp : source file that includes just the standard includes
// MClient.pch will be the pre-compiled header
// stdafx.obj will contain the pre-compiled type information
#include "stdafx.h"
< MClient.cpp>
// MClient.cpp : Defines the class behaviors for the application.
//
#include "stdafx.h"
#include "MClient.h"
#include "MClientDlg.h"
#ifdef _DEBUG
#define new DEBUG_NEW
#undef THIS_FILE
static char THIS_FILE[] = __FILE__;
#endif
/
// CMClientApp
BEGIN_MESSAGE_MAP(CMClientApp, CWinApp)
//{{AFX_MSG_MAP(CMClientApp)
// NOTE - the ClassWizard will add and remove mapping macros here.
// DO NOT EDIT what you see in these blocks of generated code!
//}}AFX_MSG
ON_COMMAND(ID_HELP, CWinApp::OnHelp)
END_MESSAGE_MAP()
/
// CMClientApp construction
CMClientApp::CMClientApp()
{
// TODO: add construction code here,
// Place all significant initialization in InitInstance
}
/
// The one and only CMClientApp object
CMClientApp theApp;
/
// CMClientApp initialization
BOOL CMClientApp::InitInstance()
{
if (FAILED(::CoInitialize(NULL)))
{
return FALSE;
}
// Standard initialization
// If you are not using these features and wish to reduce the size
// of your final executable, you should remove from the following
// the specific initialization routines you do not need.
#ifdef _AFXDLL
Enable3dControls(); // Call this when using MFC in a shared DLL
#else
Enable3dControlsStatic(); // Call this when linking to MFC statically
#endif
CMClientDlg dlg;
m_pMainWnd = &dlg;
int nResponse = dlg.DoModal();
if (nResponse == IDOK)
{
// TODO: Place code here to handle when the dialog is
// dismissed with OK
}
else if (nResponse == IDCANCEL)
{
// TODO: Place code here to handle when the dialog is
// dismissed with Cancel
}
::CoUninitialize();
// Since the dialog has been closed, return FALSE so that we exit the
// application, rather than start the application''s message pump.
return FALSE;
}