샘플 코드
void DisableSinglenullMode(){
CWinApp* pWinApp = acedGetAcadWinApp();
if(!pWinApp) return;
CComPtr<IDispatch> pDisp = pWinApp->GetIDispatch(TRUE);
if(!pDisp) return;
CComPtr<IAcadApplication> pComApp;
HRESULT hr = pDisp->QueryInterface(IID_IAcadApplication,(void**)&pComApp);
if(FAILED(hr)) return;
CComPtr<IAcadPreferences> pPreferences;
pComApp->get_Preferences(&pPreferences);
CComPtr<IAcadPreferencesSystem> pPreferSystem;
pPreferences->get_System(&pPreferSystem);
_variant_t b(VARIANT_FALSE);
pPreferSystem->put_SinglenullMode(b);
}
댓글
댓글 쓰기