欢迎来到天天文库
浏览记录
ID:23212437
大小:945.61 KB
页数:96页
时间:2018-11-05
《基于objectarx二次开发在autocad中实现qq抽屉效果》由会员上传分享,免费在线阅读,更多相关内容在工程资料-天天文库。
1、雉于objectarx二次开发在autocad中实现QQ抽層:效果操作步骤:1.在vs2005屮创建一个基于objectarx的应用押呼,程序名力:wpj-structure,2.添加基于CAcUiDockControlBar的类CDockControlBar,添加后,辟序会if)加类文件“DockControlBarChildDlg.h”和“DockControlBarChildDlg.cpp”,并在资源中自动添加ID为“IDD_D0CKC0NTR0LBAR”的对话框面板,同吋生成类文件“DockControlBarChildDlg.h”和“D
2、ockControlBarChildDlg.cpp”。3.添加GfxGroupEdit.cpp、GfxGro叩Edit.h、GfxPop叩Menu.cpp、GfxPopupMenu.h^GfxOutBarCtrl.cpp、GfxOutBarCtr1.h至ij工程中,在文件GfxGroupEdit.cpp和GfxPopupMenu.cpp中添加如下代码:^include"DockControlBarChi]dDlg.h"。4.在资源义件中导入三个光标文件,分别命名具ID为:IDC_DRAGGING、IDC_HANDCUR、IDC_NODRAGGIN
3、G;并添加Icon资源,分别命KK:ID为:ID_GFX_LARGEICON、ID_GFX_REMOVEITEM、ID_GFX_RENAMEITEM、ID_GFX_SMALLICON。5•在“DockControlBarChildDlg.h”文件屮添加:#defineIDC_LST_MENUWM3JSER+1000#include"resource.h”#includeMGfxOutBarCtrl.h”6.在“DockControlBarChildDlg.h”文件中添加变虽:CGfxOutBarCtrlwndBar;7.在“DockControl
4、BarChildDlg.h”文件中添加消息函数:afxmsglongOnOutbarNotify(WPARAMwParam,LPARAMIParam);8.在“DockControlBarChildDlg.cpp”文件中添加代码:ON_MESSAGE(WM_OUTBAR_NOT1P'Y,OnOutbarNotify)9.在“DockControlBarChi1dDlg.cpp”文件中添加OnOutbarNotify函数具体代码:1ongCDockControlBarChildDlg::OnOutbarNotify(WPARAMwParam,LPA
5、RAM1Param){switch(wParam){caseNMOBTTEMCLICK://casttheIParamtoanintegertogettheclickeditem{intindex=(int)IParam;CStringcs,csl;csl=wndBar.GetTtcmText(index):intiPIoder=wndBar.GetSelEolder();cs.Format(_T("Clickedon%dFlodor->%d::<%s>"),iFloder,(int)IParam,csl);AfxMessageBox(cs);}
6、return0;caseNM_OB_ONLABELENDED1T://casttheIParamtoanOUTBAR_INEO*struct;itwillcontaininfoabouttheediteditern//return1todothechangeand0tocancelitOUTBARINFO*pOI=(OUTBARINFO*)1Param;TRACE2(_T("Editingitem%d,newtext:%sz/),pOI->index,pOI->cText);}return1;caseNMOBONGROUPENDEDIT://
7、casttheIParamtoanOUTBAR_INFO*struct;itwillcontaininfoabouttheeditedfolder//return1todothechangeand0tocancelit{OUTBARTNFO*pOT=(OUTBARTNFO*)IParam;TRACE2(_T("Editingfolder%d,newtext:%s"),pOT-〉index,pOI-〉cText);}return1;caseNMOBDRAGITEM://casttheIParamtoanOUTBAR_TNFO*struct:it
8、willcontaininfoaboutthedraggeditems//return1todothechangeand0tocance
此文档下载收益归作者所有