Dynamic Property

Dynamic Property

Anonymous
Not applicable
416 Views
6 Replies
Message 1 of 7

Dynamic Property

Anonymous
Not applicable
Can you change the name that displays in the object properties pallet through Dynamic Properties class? If so how? Thanks, Andy
0 Likes
417 Views
6 Replies
Replies (6)
Message 2 of 7

Anonymous
Not applicable
Hi, Check-out the IOPMPropertyExtension interface GetDisplayName() method cheers cyrille "Andy Elmore" wrote in message news:4070c5e9_1@newsprd01... > Can you change the name that displays in the object properties pallet > through Dynamic Properties class? If so how? > > Thanks, > Andy > >
0 Likes
Message 3 of 7

Anonymous
Not applicable
Do you have an example of changing the properties pallet displayed name of and object?

Thanks,
Andy
0 Likes
Message 4 of 7

Anonymous
Not applicable
Do I need to create a new properties class for every property that I want to add? or can I combine properties in the classes?

Andy
0 Likes
Message 5 of 7

Anonymous
Not applicable
Hi, Try this (see dispId 0x401) STDMETHODIMP CText::GetDisplayName (DISPID dispId, BSTR *propName) { switch (dispId) { case (0x01): // this is the property name title string *propName = ::SysAllocString(L"my Text String"); break; // etc... case (0x401): // this changes the title of the entity *propName = ::SysAllocString(L"My Heading"); break; } return S_OK; } And yes you need one class for each different dynamic property type. cheers cyrille "Andy Elmore" wrote in message news:15528424.1081834738516.JavaMail.jive@jiveforum1.autodesk.com... > Do I need to create a new properties class for every property that I want to add? or can I combine properties in the classes? > > Andy
0 Likes
Message 6 of 7

Anonymous
Not applicable
You are using ::GetDisplayName (DISPID dispId, BSTR *propName)
but...
the wizard generates ::GetDisplayName (DISPID dispId, BSTR *propName)

I tried over riding the function but I get an Atl COM error so what am I doing wrong am I implementing the wrong properties method?

Thanks,
Andy
0 Likes
Message 7 of 7

Anonymous
Not applicable
sorry the wizard generates

::GetDisplayName (BSTR *pBstrName)
0 Likes