2021-06-28 04:31 PM - last edited on 2021-09-14 09:31 AM by Noemi Balogh
Solved! Go to Solution.
2021-06-29 07:56 AM
/* [ 1] */ UserItem 100 100 50 50 ClientEdge
myUserItem (GetReference (), MyUserItemID)
void MyDialog::UserItemUpdate (const DG::UserItemUpdateEvent& ev) { NewDisplay::UserItemUpdateNativeContext context (ev); // ... context.DrawImage (image, width, height, 0.0f, 0.0f, 0.0f, false); // ... }
2021-06-28 06:50 PM
2021-06-28 11:39 PM
2021-06-29 07:56 AM
/* [ 1] */ UserItem 100 100 50 50 ClientEdge
myUserItem (GetReference (), MyUserItemID)
void MyDialog::UserItemUpdate (const DG::UserItemUpdateEvent& ev) { NewDisplay::UserItemUpdateNativeContext context (ev); // ... context.DrawImage (image, width, height, 0.0f, 0.0f, 0.0f, false); // ... }
2021-06-29 09:19 AM
2021-06-29 09:57 AM
Viktor wrote:If someone arrives to this post and does not know where the UserItemUpdateNativeContext is located it is here: AC_DEV_KIT_PATH\Support\Modules\DGGraphix
Unfortunately there is no easy example among the example add-ons, but here are the basics.
void MyDialog::UserItemUpdate (const DG::UserItemUpdateEvent& ev) { NewDisplay::UserItemUpdateNativeContext context (ev); // ... context.DrawImage (image, width, height, 0.0f, 0.0f, 0.0f, false); // ... }
2021-06-29 11:19 AM
Mihalcea wrote:Hi Michalcea,
I was thinking about buying the Developer Support for a year. Where can I find some information about the services included in this subscription from GRAPHISOFT?
2021-06-29 01:16 PM
2021-06-29 05:16 PM
Viktor wrote:This code works only inside the "UserItemUpdate" function when the UserItem updates. I am having a real hard time figuring out how to pass this context to a function like
void MyDialog::UserItemUpdate (const DG::UserItemUpdateEvent& ev) { NewDisplay::UserItemUpdateNativeContext context (ev); // ... context.DrawImage (image, width, height, 0.0f, 0.0f, 0.0f, false); // ... }
virtual void UserItemClicked(const DGUserItemClickEvent &ev) { //draw something when user clicks } virtual void SpecDragStarting(const ItemDragSourceEvent &ev) { //do something when user starts dragging like fetch an image from Google Earth based on the new coordinates }I tried to reference it, but obviously I get Memory Access Exception.
2021-06-30 06:49 AM