Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Shaun E on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Help with drawing to the desktop 1

Status
Not open for further replies.

SykoStokkrTim

Programmer
Jul 19, 2002
20
US
I posted about this a long while back, and I was referred to the windows API, and now I've learned a little bit about it, and I still can't figure out how to draw graphics and animations directly to the desktop. My general idea is for one of those annoying little deskmate programs like bonzi. The api file is huge so I could just be missing it, so if someone could point me in the right direction, that would be cool.

peace.gif

"I am not a crook!
 
sorry if this is simplistic, but:
Most of the Windows API calls require a handle to a Device Context (hDC)

You'ld need to check this, but I seem to recall the screen being the result of GetDC(0)

If so, do your drawing to that, and it should work.
Remember that the drawing you do is not persistent - other programs will erase your drawing if they refresh the screen area you used.

Also, you may need to grab parts of the screen from 'below' your character, and 'mask' this, if you want to draw something with an irregular shape.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top