87 lines
2.0 KiB
C++
87 lines
2.0 KiB
C++
//////////////////////////////////////////////////////////////////////////
|
|
// 拷贝内部块对话框, 在CMyListView右键"填加块"调用
|
|
// 创建人: 黄荣平
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_ADDBLOCKDLG_H__FD745D27_C09A_4C0B_90E3_8DD9C482DAB4__INCLUDED_)
|
|
#define AFX_ADDBLOCKDLG_H__FD745D27_C09A_4C0B_90E3_8DD9C482DAB4__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif
|
|
|
|
#include "resource.h"
|
|
|
|
class CListItem
|
|
{
|
|
public:
|
|
CListItem()
|
|
{
|
|
m_hIcon=NULL;
|
|
m_strName="";
|
|
}
|
|
~CListItem()
|
|
{
|
|
|
|
}
|
|
CString m_strName;
|
|
HICON m_hIcon;
|
|
};
|
|
typedef CArray<CListItem,CListItem>CListItemArray;
|
|
class CAddBlockDlg : public CAcUiDialog
|
|
{
|
|
// Construction
|
|
public:
|
|
CAddBlockDlg(CWnd* pParent = NULL, HINSTANCE hInstance =NULL);
|
|
~CAddBlockDlg();
|
|
// Dialog Data
|
|
//{{AFX_DATA(CAddBlockDlg)
|
|
enum { IDD = IDD_BLOCKINSERTDLG };
|
|
CListCtrl m_ListOrg;
|
|
CListCtrl m_ListDesc;
|
|
//}}AFX_DATA
|
|
|
|
|
|
// Overrides
|
|
// ClassWizard generated virtual function overrides
|
|
//{{AFX_VIRTUAL(CAddBlockDlg)
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support
|
|
//}}AFX_VIRTUAL
|
|
|
|
// Implementation
|
|
public:
|
|
BOOL InsertBlockToDesc(CString sDwgPath,CListItemArray &itemArr);
|
|
void DeleteBlockBtwDwg(CStringArray &sBlockArr);
|
|
void AddOrgListItemToDescList(CListItemArray &itemArr);
|
|
CImageList m_ListImageOrg;
|
|
CImageList m_ListImageDesc;
|
|
CString m_sOrgPath;
|
|
CString m_sDescPath;
|
|
void SetDescList();
|
|
void SetOrgPath(CString sOrgPath);
|
|
void SetDescPath(CString sDescPath);
|
|
void SetOrgList();
|
|
BOOL ClearAcadCmdLine();
|
|
BOOL findTextInListDesc(CString sText);
|
|
AcDbDatabase *m_pDescDb;
|
|
BOOL m_bAddCur;
|
|
CListItemArray m_itemArr;
|
|
protected:
|
|
|
|
// Generated message map functions
|
|
//{{AFX_MSG(CAddBlockDlg)
|
|
virtual void OnOK();
|
|
virtual void OnCancel();
|
|
virtual BOOL OnInitDialog();
|
|
afx_msg void OnInsertbtn();
|
|
afx_msg void OnDeletebtn();
|
|
afx_msg void OnBdeleteallbtn();
|
|
afx_msg void OnSize(UINT nType, int cx, int cy);
|
|
afx_msg void OnBdrename();
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
};
|
|
|
|
#endif
|