Page 1 of 1

A question of transparent of SimpleGraph

PostPosted: March 20th, 2009, 3:47 am
by zjs316
Dear Kambiz :
How are you? I am Chinese.I have a question want to ask you.The
SimpleGraph control achieve transparent ,the principle of transparency in
implementation is check the area of SimpleGraph where the parent window of
the picture at first, then copy the area to background of SimpleGraph
control. Why not directly through the windows settings, set background of
SimpleGraph control go transparent ? windows is how to form a transparent
style of implementation?How to implementation transparent style of Windows
Operating system?
My English is very poor,So I don't know whether I express clear.
Look forward to your reply.Thank you very much!

Re: A question of transparent of SimpleGraph

PostPosted: March 20th, 2009, 3:26 pm
by Kambiz
Hi,

The SimpleGraph control does not support transparency.

However, if you mean transparency of nodes, you can achieve it by setting node's brush style to bsClear or use one of mask pen styles.

Re: A question of transparent of SimpleGraph

PostPosted: March 23rd, 2009, 1:12 am
by zjs316
Hi, Kambiz!
I mean transparency is background of the control is transparent . How implement real transparent background of the SimpleGraph?
Thank you very much!

Re: A question of transparent of SimpleGraph

PostPosted: March 23rd, 2009, 10:03 am
by Kambiz
I don't how to achieve that real transparency.

If you have static controls behind the SimpleGraph control, you can have transparency by setting Transparent property to True. But if any background controls changes, you have to invalidate SimpleGraph control.

Re: A question of transparent of SimpleGraph

PostPosted: March 24th, 2009, 2:00 am
by zjs316
Kambiz,thank you very much!
I think I can't express my question mean because my bad English.
I kown achieve transparent of background of SimpleGraph by read your source code,the principle of transparent is copy the SimpleGraph 's parent control 's bitmap to meoDC ,then copy the parent image to background of SimpleGraph .

Re: A question of transparent of SimpleGraph

PostPosted: March 24th, 2009, 2:14 am
by zjs316
Now ,I Rewrite the WMPaint function ,I conceal the CopyParentImage function ,then use PaintWindow API function .but have to invalidate background control to invalidate simplegraph 's background