是否启用undo,默认没有启用
[id(212), helpstring("property EnableUndo")]
VARIANT_BOOL EnableUndo;
例如: Qt代码里启用undo代码
#include <ActiveQt/QAxWidget> #include <ActiveQt/QAxObject> TestQt2::TestQt2(QWidget *parent, Qt::WFlags flags) : QMainWindow(parent, flags) { QAxObject object("{4FF8F5E1-8D85-45CC-B58E-BE1CF4A5C3EC}"); object.dynamicCall("IniSet(const QString&)", "EnableUndo=Y"); ui.setupUi(this); }
例如: C++ COM 代码里启用undo代码
IMxDrawApplicationPtr getApplication; getApplication.CreateInstance(__uuidof(MxDrawApplication)); IMxDrawApplication *pApplication = getApplication; pApplication->Iniset(_bstr_t("EnableUndo=Y"));
例如: C#代码里启用undo代码
static void Main() { MxDrawApplication app = new MxDrawApplication(); app.Iniset("FireCreateEvent=Y"); ... private void axMxDrawX1_CustomEvent(object sender, AxMxDrawXLib._DMxDrawXEvents_CustomEventEvent e) { if (e.sEventName == "Mx_startCreateMxDraw") { axMxDrawX1.EnableUndo = true; } }