Jump to content

Recommended Posts

Posted (edited)

Hi

 

If you execute this:

Local   $hGraphics  =_GDIPlus_GraphicsCreateFromHWND($SomeWindowHandle)

You will get a Graphics object that will enable you to draw on that specific Window you passed to the function.

 

But what if you want to draw on the screen generally?

Let's say you have your desktop visible, and on it 3 windows open, not maximized,

and you want to draw on the screen some text,

and that text might cover both the desktop, +some of the open windows..

What graphics object should you then get?

And how do you get it?

 

Thank you

Edited by Zohar
Posted

Hi JohnOne

Thank you for this idea.

Specficically, the function _GDIPlus_GraphicsCreateFromHWND() is defined like this:

_GDIPlus_GraphicsCreateFromHWND($hWnd)
 

So I cannot call it with 0 parameters.

 

Any other CreateGraphics() function that I might try?

Posted

Did it give you an error?

Yes it doesn't pass compilation (Ctrl-F5)

 

Did you try with desktop handle?

When I try with the Desktop's handle, it doesn't draw on the desktop for some reason, at all.

Posted (edited)

Perfect!!!

Now it draws over everything open, not just the desktop but also open windows on it!

Thank you very much JohnOne

 

Edit:

BTW Is there a way I could successfully do it with _GDIPlus_GraphicsCreateFromHWND() too?

When I try _GDIPlus_GraphicsCreateFromHWND(0), it draws nothing.

Edited by Zohar

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...