当前位置:首页 > 使用ObjectARX2015开发类似outlook浮动面板窗格
}
}
mChildDlg->SetWindowPos (this, lpRect->left + 4, lpRect->top + 4, lpRect->Width (),
lpRect->Height (), SWP_NOZORDER) ;
//-----------------------------------------------------------------------------
CSize CDockControlBar::CalcFixedLayout( BOOL bStretch , BOOL bHorz ) { }
//-----------------------------------------------------------------------------
//----- Function called when user selects a command from Control menu or when user //----- selects the Maximize or the Minimize button.
void CDockControlBar::OnSysCommand (UINT nID, LPARAM lParam) { }
//-----------------------------------------------------------------------------
//----- The framework calls this member function after the window's size has changed void CDockControlBar::OnSize (UINT nType, int cx, int cy) { }
void CDockControlBar::OnClose()
CAcUiDockControlBar::OnSize (nType, cx, cy) ; // If valid
if (::IsWindow (mChildDlg->GetSafeHwnd ())) { }
//----- Always point to our resource to be safe CAcModuleResourceOverride resourceOverride ; //----- then update its window position relatively mChildDlg->MoveWindow (0, 0, cx, cy) ;
CAcUiDockControlBar::OnSysCommand (nID, lParam) ; //如果当前处于浮动状态 if (IsFloating()) { }
else //处于固定状态 { }
return CSize(150,450); CRect m_r1; GetClientRect(m_r1);
//m_childDlg->SetWindowPos (this, m_r1.left+2, m_r1.top, m_r1.Width (), m_r1.Height (),
return CSize(150,450);
SWP_NOZORDER) ;
{ }
// TODO: Add your message handler code here and/or call default if (mChildDlg != NULL) { }
CAcUiDockControlBar::OnClose();
DestroyWindow();
DockControlBarChildDlg.h
// (C) Copyright 2002-2007 by Autodesk, Inc. //
// Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, // provided that the above copyright notice appears in all copies and // that both that copyright notice and the limited warranty and // restricted rights notice below appear in all supporting // documentation. //
// AUTODESK PROVIDES THIS PROGRAM \ // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE // UNINTERRUPTED OR ERROR FREE. //
// Use, duplication, or disclosure by the U.S. Government is subject to // restrictions set forth in FAR 52.227-19 (Commercial Computer // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) // (Rights in Technical Data and Computer Software), as applicable. //
//-----------------------------------------------------------------------------
//----- DockControlBarChildDlg.h : Declaration of the CDockControlBarChildDlg //----------------------------------------------------------------------------- #pragma once
//----------------------------------------------------------------------------- #include \
//-----------------------------------------------------------------------------
class CDockControlBarChildDlg : public CAcUiDialog { public: public:
protected: } ;
afx_msg LRESULT OnAcadKeepFocus (WPARAM wParam, LPARAM lParam) ; afx_msg void OnDblClkTree(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnDblClkTree1(NMHDR* pNMHDR, LRESULT* pResult); afx_msg void OnDblClkTree2(NMHDR* pNMHDR, LRESULT* pResult); DECLARE_MESSAGE_MAP() virtual BOOL OnInitDialog(); BOOL CreateTreeControl(); BOOL CreateTreeControl1(); BOOL CreateTreeControl2();
CMFCOutlookBar m_wndOutlookBar; //CMFCOutlookBarPane m_wndOutlookPane; CTreeCtrl m_wndTree; //结构分析 CTreeCtrl m_wndTree1;//工具箱 CTreeCtrl m_wndTree2;//绘图 CImageList Treelist;
virtual void DoDataExchange (CDataExchange *pDX) ;
virtual BOOL OnCommand (WPARAM wParam, LPARAM lParam) ; enum { IDD = IDD_DOCKCONTROLBAR};
CDockControlBarChildDlg (CWnd *pParent =NULL, HINSTANCE hInstance =NULL) ; DECLARE_DYNAMIC (CDockControlBarChildDlg)
protected:
protected: public:
DockControlBarChildDlg.cpp
// (C) Copyright 2002-2007 by Autodesk, Inc. //
// Permission to use, copy, modify, and distribute this software in // object code form for any purpose and without fee is hereby granted, // provided that the above copyright notice appears in all copies and // that both that copyright notice and the limited warranty and // restricted rights notice below appear in all supporting // documentation. //
// AUTODESK PROVIDES THIS PROGRAM \ // AUTODESK SPECIFICALLY DISCLAIMS ANY IMPLIED WARRANTY OF
// MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE. AUTODESK, INC. // DOES NOT WARRANT THAT THE OPERATION OF THE PROGRAM WILL BE // UNINTERRUPTED OR ERROR FREE. //
// Use, duplication, or disclosure by the U.S. Government is subject to // restrictions set forth in FAR 52.227-19 (Commercial Computer // Software - Restricted Rights) and DFAR 252.227-7013(c)(1)(ii) // (Rights in Technical Data and Computer Software), as applicable. //
//----------------------------------------------------------------------------- //- DockControlBar.cpp : Implementation of CDockControlBarChildDlg //----------------------------------------------------------------------------- #include \
#include \
#include \ #include \
//----------------------------------------------------------------------------- #ifdef _DEBUG
#define new DEBUG_NEW #undef THIS_FILE
static char THIS_FILE[] = __FILE__; #endif
//----------------------------------------------------------------------------- IMPLEMENT_DYNAMIC (CDockControlBarChildDlg, CAcUiDialog)
BEGIN_MESSAGE_MAP(CDockControlBarChildDlg, CAcUiDialog)
//-----------------------------------------------------------------------------
CDockControlBarChildDlg::CDockControlBarChildDlg (CWnd *pParent /*=NULL*/, HINSTANCE hInstance /*=NULL*/) : CAcUiDialog (CDockControlBarChildDlg::IDD, pParent, hInstance) {
//{{AFX_DATA_INIT(CDockControlBarChildDlg) //{{AFX_MSG_MAP(CDockControlBarChildDlg)
ON_MESSAGE(WM_ACAD_KEEPFOCUS, OnAcadKeepFocus) // Needed for modeless dialog. //}}AFX_MSG_MAP
ON_NOTIFY(NM_DBLCLK, ID_VIEW_TASKPANE_CTREE, OnDblClkTree) ON_NOTIFY(NM_DBLCLK, ID_VIEW_TASKPANE_CTREE1, OnDblClkTree1) ON_NOTIFY(NM_DBLCLK, ID_VIEW_TASKPANE_CTREE2, OnDblClkTree2)
END_MESSAGE_MAP()
共分享92篇相关文档