- UID
- 775380
- 积分
- 21
- 精华
- 贡献
-
- 威望
-
- 活跃度
-
- D豆
-
- 在线时间
- 小时
- 注册时间
- 2018-4-18
- 最后登录
- 1970-1-1
|
马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?立即注册
×
本帖最后由 jaishe 于 2018-8-15 10:35 编辑
我想做一个Palette, 以下用ARX在自动生成的代码 ,直接编译都不通过提示:
myPalette1.cpp(31): fatal error C1083: 无法打开类型库文件: “msxml.dll”: No such file or directory
网上找资料说windows7不再是MSXML了,而是MSXML6,我直接改成MSXML6名字,编译报错又会提示:: error C2653: “MSXML”: 不是类或命名空间名称
有没有那个大神也遇到过这样的问题啊。或者有知错怎么解决的提点一下,谢谢。
(我的环境是:objectArx 2018 + Vs2015 + Windows 10)
#include "StdAfx.h"
#include "resource.h"
#include "myPalette1.h"
//-----------------------------------------------------------------------------
//- Import the MSXML functionality
#import "msxml6.dll" named_guids
//using namespace MSXML ;
//-----------------------------------------------------------------------------
IMPLEMENT_DYNAMIC (myPalette1, CAdUiPalette)
BEGIN_MESSAGE_MAP(myPalette1, CAdUiPalette)
ON_WM_CREATE()
ON_WM_SIZE()
ON_WM_SIZING()
END_MESSAGE_MAP()
//-----------------------------------------------------------------------------
myPalette1::myPalette1 (HINSTANCE hInstance) : CAdUiPalette (), mChildDlg(NULL, hInstance) {
}
//-----------------------------------------------------------------------------
myPalette1::~myPalette1 () {
}
//-----------------------------------------------------------------------------
//- Load the input data from xml.
BOOL myPalette1::Load (IUnknown *pUnk) {
//- Call base class first
CAdUiPalette::Load (pUnk) ;
//- Initialise for XML
CComQIPtr<MSXML::IXMLDOMNode> pNode(pUnk) ;
MSXML::IXMLDOMNodePtr pChild, pChild1 ;
// TODO: read in data from palette XML
return (TRUE) ;
}
//-----------------------------------------------------------------------------
//- Save the input data to xml.
BOOL myPalette1::Save (IUnknown *pUnk) {
//- Call base class first
CAdUiPalette::Save (pUnk) ;
//- initialise for XML
CComQIPtr<MSXML::IXMLDOMNode> pNode(pUnk) ;
MSXML::IXMLDOMNodePtr pChild, pChild1 ;
// TODO: save data to palette XML
return (TRUE) ;
}
//-----------------------------------------------------------------------------
//- Used to add a dialog resource
int myPalette1::OnCreate (LPCREATESTRUCT lpCreateStruct) {
if ( CAdUiPalette::OnCreate (lpCreateStruct) == -1 )
return (-1) ;
//- Create it and set the parent as the dockctrl bar
mChildDlg.Create (IDD_MYPALETTE1, this) ;
CRect rect ;
GetWindowRect (&rect) ;
//- Move the window over so we can see the control lines
mChildDlg.MoveWindow (0, 0, rect.Width (), rect.Height (), TRUE) ;
return (0) ;
}
//-----------------------------------------------------------------------------
//- Called by the palette set when the palette is made active
void myPalette1::OnSetActive () {
return (CAdUiPalette::OnSetActive ()) ;
}
//-----------------------------------------------------------------------------
//- Called by AutoCAD to steal focus from the palette
bool myPalette1::CanFrameworkTakeFocus () {
//- Not simply calling IsFloating() (a BOOL) avoids warning C4800
return (GetPaletteSet ()->IsFloating () == TRUE ? true : false) ;
}
//-----------------------------------------------------------------------------
void myPalette1::OnSize (UINT nType, int cx, int cy) {
CAdUiPalette::OnSize (nType, cx, cy) ;
//- If valid
if ( ::IsWindow (mChildDlg.GetSafeHwnd ()) ) {
//- Forward the call
mChildDlg.OnSize (nType, cx, cy) ;
}
}
|
|