-
大小: 74.52MB文件类型: .rar金币: 1下载: 0 次发布日期: 2022-01-28
- 语言: C/C++
- 标签: ObjecttARX
资源简介
在ObjectARX中使用MFC-可停靠窗体,项目源代码,对应于张帆书中的11.4节。
代码片段和文件信息
// (C) Copyright 2002-2012 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 “AS IS“ AND WITH ALL FAULTS.
// 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.
//
//-----------------------------------------------------------------------------
//----- acrxEntryPoint.cpp
//-----------------------------------------------------------------------------
#include “StdAfx.h“
#include “resource.h“
#include “MyDockControlBar.h“
//-----------------------------------------------------------------------------
#define szRDS _RXST(“AAA“)
CMyDockControlBar* g_pDlgBar = NULL;
//-----------------------------------------------------------------------------
//----- objectARX EntryPoint
class CDockControlBar3App : public AcRxArxApp {
public:
CDockControlBar3App () : AcRxArxApp () {}
virtual AcRx::AppRetCode On_kInitAppMsg (void *pkt) {
// TODO: Load dependencies here
// You *must* call On_kInitAppMsg here
AcRx::AppRetCode retCode =AcRxArxApp::On_kInitAppMsg (pkt) ;
// TODO: Add your initialization code here
//显示可停靠的窗体
CAcModuleResourceOverride resOverride;
if (g_pDlgBar == NULL)
{
g_pDlgBar = new CMyDockControlBar();
g_pDlgBar->Create(acedGetAcadframe() (LPCSTR)_T(“DockerBar“));
g_pDlgBar->SetWindowText(_T(“MyControlBar“));
// changes the text of the specified window‘s title bar (if it has one).
g_pDlgBar->EnableDocking(CBRS_ALIGN_ANY);
//CBRS_ALIGN_ANY Allows docking on any side of the client area.
}
acedGetAcadframe()->FloatControlBar(g_pDlgBar CPoint(100 100) CBRS_ALIGN_TOP); //初始位置//CBRS_ALIGN_TOP Orients the control bar vertically.
acedGetAcadframe()->ShowControlBar(g_pDlgBar TRUE TRUE);//void ShowControlBar( CControlBar* pBar BOOL bShow BOOL bDelay );
return (retCode) ;
}
virtual AcRx::AppRetCode On_kUnloadAppMsg (void *pkt) {
// TODO: Add your code here
// You *must* call On_kUnloadAppMsg here
AcRx::AppRetCode retCode =AcRxArxApp::On_kUnloadAppMsg (pkt) ;
// TODO: Unload dependencies here
//手动销毁可停靠窗体
if (g_pDlgBar != NULL)
{
g_pDlgBar->DestroyWindow();
delete g_pDlgBar;
g_pDlgBar = NULL;
属性 大小 日期 时间 名称
----------- --------- ---------- ----- ----
..A..H. 13312 2018-08-17 08:50 DockControlBar3\.vs\DockControlBar3\v14\.suo
文件 7039 2018-08-17 13:48 DockControlBar3\acrxEntryPoint.cpp
文件 1634 2018-05-10 06:07 DockControlBar3\Autodesk.arx-2018-net.props
文件 5552 2018-05-10 06:07 DockControlBar3\Autodesk.arx-2018.props
文件 3248 2018-08-17 14:00 DockControlBar3\ChildDlg.cpp
文件 1770 2018-08-17 14:00 DockControlBar3\ChildDlg.h
文件 635 2017-03-09 01:42 DockControlBar3\crx.props
文件 1895 2018-08-17 08:50 DockControlBar3\DocData.cpp
文件 1692 2018-08-17 08:50 DockControlBar3\DocData.h
文件 37996 2018-08-17 13:18 DockControlBar3\DockControlBar3.aps
文件 2180 2018-08-17 08:50 DockControlBar3\DockControlBar3.cpp
文件 2993 2018-08-17 13:18 DockControlBar3\DockControlBar3.rc
文件 1311 2018-08-17 08:50 DockControlBar3\DockControlBar3.sln
文件 126619648 2018-08-17 08:50 DockControlBar3\DockControlBar3.VC.db
..A..H. 58 2018-08-17 08:50 DockControlBar3\DockControlBar3.VC.VC.opendb
文件 5426 2018-08-17 13:18 DockControlBar3\DockControlBar3.vcxproj
文件 2123 2018-08-17 13:18 DockControlBar3\DockControlBar3.vcxproj.filters
文件 169082880 2018-08-17 13:06 DockControlBar3\ipch\DOCKCONTROLBAR3-f1e7b583\DOCKCONTROLBAR3-8cd307d4.ipch
文件 4484 2018-08-17 13:48 DockControlBar3\MyDockControlBar.cpp
文件 1936 2018-08-17 13:48 DockControlBar3\MyDockControlBar.h
文件 1862 2018-08-17 08:50 DockControlBar3\ReadMe.txt
文件 540 2018-08-17 13:52 DockControlBar3\resource.h
文件 1371 2018-08-17 08:50 DockControlBar3\StdAfx.cpp
文件 3487 2018-08-17 08:50 DockControlBar3\StdAfx.h
文件 70656 2018-08-17 14:00 DockControlBar3\x64\Debug\AAADockControlBar3.arx
文件 678 2018-08-17 13:25 DockControlBar3\x64\Debug\AAADockControlBar3.Build.CppClean.log
文件 800 2018-08-17 14:00 DockControlBar3\x64\Debug\AAADockControlBar3.exp
文件 1948 2018-08-17 14:00 DockControlBar3\x64\Debug\AAADockControlBar3.lib
文件 7548928 2018-08-17 14:00 DockControlBar3\x64\Debug\AAADockControlBar3.pdb
文件 77765 2018-08-17 14:00 DockControlBar3\x64\Debug\acrxEntryPoint.obj
............此处省略35个文件信息
评论
共有 条评论