132 lines
3.6 KiB
C++
132 lines
3.6 KiB
C++
//////////////////////////////////////////////////////////////////////////
|
|
// 对话框主界面, 在CDockPane中创建CToolBar和CMainFrame
|
|
// 创建人: 周风生、黄荣平
|
|
//////////////////////////////////////////////////////////////////////////
|
|
|
|
#if !defined(AFX_DOCKDIALOG_H__320EE0BD_4A2B_47CA_8B72_C89B80CF508B__INCLUDED_)
|
|
#define AFX_DOCKDIALOG_H__320EE0BD_4A2B_47CA_8B72_C89B80CF508B__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif
|
|
|
|
#include "resource.h"
|
|
#include "DlgToolBar.h"
|
|
#include "MainFrame.h"
|
|
#include "GsPreviewCtrl.h"
|
|
#include "shsCoolBar3.h"
|
|
|
|
class CDockDialog : public CAcUiDialog
|
|
{
|
|
|
|
public:
|
|
CDockDialog(CWnd* pParent = NULL, HINSTANCE hInstance =NULL);
|
|
|
|
//{{AFX_DATA(CDockDialog)
|
|
enum { IDD = IDD_DOCKDIALOG };
|
|
//}}AFX_DATA
|
|
|
|
//{{AFX_VIRTUAL(CDockDialog)
|
|
public:
|
|
// virtual BOOL PreTranslateMessage(MSG* pMsg); // 响应CToolBar的CCmdUI消息
|
|
|
|
protected:
|
|
virtual void DoDataExchange(CDataExchange* pDX);
|
|
virtual BOOL OnInitDialog();
|
|
virtual BOOL OnCommand(WPARAM wParam, LPARAM lParam); // 响应OK和CANCEL消息
|
|
//}}AFX_VIRTUAL
|
|
|
|
protected:
|
|
//{{AFX_MSG(CDockDialog)
|
|
afx_msg int OnCreate(LPCREATESTRUCT lpCreateStruct);
|
|
afx_msg void OnSize(UINT nType, int cx, int cy);
|
|
afx_msg void OnDestroy();
|
|
|
|
//工具栏提示
|
|
afx_msg BOOL OnToolTipText(UINT, NMHDR* pNMHDR, LRESULT* pResult);
|
|
// 工具条下拉消息
|
|
afx_msg void OnDropDown(NMHDR* pNotifyStruct,LRESULT* result);
|
|
// 更新下拉菜单
|
|
afx_msg void OnInitMenuPopup(CMenu* pPopupMenu, UINT nIndex, BOOL bSysMenu);
|
|
|
|
afx_msg void OnButtonfirst();
|
|
afx_msg void OnButtonsecond();
|
|
afx_msg void OnButtontree();
|
|
afx_msg void OnButtonfour();
|
|
afx_msg void OnButtonfive();
|
|
afx_msg void OnButtonsix();
|
|
afx_msg void OnUpdateButtonfirst(CCmdUI* pCmdUI);
|
|
afx_msg void OnUpdateButtonsecond(CCmdUI* pCmdUI);
|
|
afx_msg void OnUpdateButtontree(CCmdUI* pCmdUI);
|
|
afx_msg void OnUpdateButtonfour(CCmdUI* pCmdUI);
|
|
afx_msg void OnUpdateButtonfive(CCmdUI* pCmdUI);
|
|
afx_msg void OnUpdateButtonsix(CCmdUI* pCmdUI);
|
|
afx_msg void OnBigIcon();
|
|
afx_msg void OnSmallIcon();
|
|
afx_msg void OnListIcon();
|
|
afx_msg void OnReportIcon();
|
|
afx_msg void OnInSertBlock();
|
|
afx_msg void OnUpdateBlockInsert(CCmdUI* pCmdUI);
|
|
|
|
afx_msg void OnBlockInstead();
|
|
afx_msg void OnUpdateBlockInstead(CCmdUI* pCmdUI);
|
|
|
|
afx_msg void OnBlockDel();
|
|
afx_msg void OnUpdateBlockDel(CCmdUI* pCmdUI);
|
|
|
|
afx_msg void OnBlockSet();
|
|
afx_msg void OnUpdateBlockSet(CCmdUI* pCmdUI);
|
|
|
|
afx_msg void OnSelectAll();
|
|
afx_msg void OnUpdateSelectAll(CCmdUI* pCmdUI);
|
|
|
|
|
|
//}}AFX_MSG
|
|
DECLARE_MESSAGE_MAP()
|
|
|
|
public:
|
|
BOOL m_bCurDb;
|
|
BOOL m_bFirst;
|
|
BOOL m_bSecond;
|
|
BOOL m_bThree;
|
|
BOOL m_bFouth;
|
|
int m_nCurrentPos;
|
|
BOOL m_bHatch;
|
|
BOOL m_bBlock;
|
|
int m_IconDwg;
|
|
int m_IconPat;
|
|
int m_IconColor;
|
|
int m_IconFolder;
|
|
int m_IconHach;
|
|
CString m_sDirPath;
|
|
CString m_sDwgPath;
|
|
int m_nType;
|
|
CString m_sPathName;
|
|
CGsPreviewCtrl mPreviewCtrl;
|
|
CDlgToolBar m_wndToolBar;
|
|
CMainFrame *m_pMyFrame;
|
|
CImageList m_TreeImage, m_ListImage;
|
|
|
|
CStringArray m_sIniArr;
|
|
CStringArray m_sIniBigIcon;
|
|
CStringArray m_sIniSmlIcon;
|
|
CBitmap m_FileTypeBMP; // 文件类型BMP
|
|
public:
|
|
void SetState();
|
|
void GetIniArray(); //获得所有要显示的INI名称,和图标列表
|
|
CHYCoolBar3& getExPlainBar();
|
|
void ColorHatch(int nColor); //填充
|
|
void ViewIni(HTREEITEM hParent,CString sIniName);
|
|
void AddItemToTreeCtrl();
|
|
// 提供一个DWG的全路径名,在ListCtrl中显示内部块
|
|
void AddItemToListCtrl(CString sDwgName);
|
|
void patternHatch(CString sPattern); //填充
|
|
CListCtrl& getListCtrl();
|
|
CCoolTreeCtrl& getTreeCtrl();
|
|
CGsPreviewCtrl& getPreviewCtrl();
|
|
|
|
CString m_strSubPath;
|
|
};
|
|
|
|
#endif
|