How can I intercept GetDC calls?

Windows specific forum
jrw
User
User
Posts: 24
Joined: Fri Jul 18, 2003 6:25 pm

How can I intercept GetDC calls?

Post by jrw »

Im writing a shareware image manipulation/morphing program. The full version will allow the user to save their picture but it will contain a shareware banner much like HyperSnapDX. Im worried that many people will simply grab the application window and then just save it in some other freeware screengrab utility.

So how can I intercept any calls to GETDC ? because I want to have the same type of banner accross the picture if someone attempts to grab the current image they are editing into another program.

I hope that made some kind of sense :lol:
netmon
User
User
Posts: 12
Joined: Sun Jul 27, 2003 4:29 pm

Post by netmon »

you have more to worry about then people using getdc.. just a simple print screen will do the trick. but back to your original question.. getdc isnt a windows message that can be detected. the only thing i could think of would be to look at what processes are running and maybe kill those off that you dont want to run (exitprocess). This may not be such a good idea though. although you might want to close out your own application and have it refuse to run if you detect another program is running.

I would simply live with this fact and maybe cripple the software in some other way.
jrw
User
User
Posts: 24
Joined: Fri Jul 18, 2003 6:25 pm

Post by jrw »

I think it would be possible but its going to be difficult to write in purebasic.

The best way to cripple an animation program is for a watermark to be embedded but it gets messy if you force a watermark on a project which is work-in-progress.

I might have to write some c++ code as a background process, that should do the trick.
Post Reply