Message 1 of 5
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report
Hi,
I implemented OPM wrapper for my custom entity and I overrided the method GetDisplayName to specify custom properties names and a custom display name like this:
STDMETHODIMP CCustomWrapper::GetDisplayName(DISPID dispId, BSTR * propName) { HRESULT hr = S_OK; switch(dispId) { case DISPID_...: *propName = ::SysAllocString(_T("My property")); break; case DISPID_DISPLAYNAME: *propName = ::SysAllocString(_T("MyCustomEntity")); break; default: hr = IOPMPropertyExtensionImpl<CCustomWrapper>::GetDisplayName(dispId, propName); assert(hr == S_OK); } return hr; }
The problem is that the call to IOPMPropertyExtensionImpl<CCustomWrapper>::GetDisplayName(dispId, propName); always returns E_FAIL. The result is that the name of each common properties of AcDbEntities is not correct. See the images below:
What did I do wrong? In the ObjectARX samples, no call to the parent IOPMPropertyExtensionImpl is made...
Regards,
Jonathan
--
Jonathan
Jonathan
Solved! Go to Solution.