drawing graphics on top of the control

drawing graphics on top of the control

Anonymous
Not applicable
1,256 Views
2 Replies
Message 1 of 3

drawing graphics on top of the control

Anonymous
Not applicable

Hello,

 

I have a need to draw some graphics such as lines or circles on the top of the view control client area.

 

I can't seem to get the order right so the control always has the last word in the painting order. Does anyone know who to do this? I have tried several approaches such as overlaying transparent windows or deriving my own viewcontrol class but I can't draw on top of the control.

 

I would appreciate any suggestions.

 

Many thanks,

 

Ken 

0 Likes
Accepted solutions (1)
1,257 Views
2 Replies
Replies (2)
Message 2 of 3

adam.nagy
Autodesk Support
Autodesk Support
Accepted solution

Hi Ken,

 

Placing a transparent window in front of the control and drawing into that should work fine - it works for me. 

 

See attached project.

 

Cheers,

Adam Nagy

Autodesk Developer Network



Adam Nagy
Autodesk Platform Services
0 Likes
Message 3 of 3

Anonymous
Not applicable

Thank you Adam,

 

I see what you are doing with the transparency key. This is very useful and I can use it for some things I want to do. Infortunately the mouse events only come through where graphics are drawn in anything other that the key colour. This is fine for some situations but I am still looking for a way to get the events when the mouse is over the control.

.

The only thing I have tried that will get the events while the mouse is over the control is to use the WndProc method or use a message filter class. I find using these methods to be rather messy and don't really want to use them, do you have any suggestions for getting the mouse events?

 

Many thanks,

 

Ken

0 Likes