Jump to content
  • Advertisement
Sign in to follow this  
wease

Can I access other window's OnPaint() and OnErase() functions?

This topic is 4928 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

I have a program(window 1) that wants to update another window (window 2) that is not part of my program. I have the HWND for this window(window 2) but nothing else. I want to update an image in window 2 when window 2 calls OnPaint() and OnErase(). Is it possible to redefine these functions from another program? I assume that I cannot because this idea sounds crazy. If I cannot, maybe I should just run a constant loop in my window 1 program that checks for messages in window 2. Is this a bad idea?

Share this post


Link to post
Share on other sites
Advertisement
Just so you know, I tried doing an infinite loop where I constantly check the messages on the other window. Didn't work so well. Probably isn't a good way to do it anyway. Just caused my program to hand and never seemed to get either of the WM_PAINT or WM_ERASEBKGND (ie, they were removed from the messge queue before any other program could process them I think).

Share this post


Link to post
Share on other sites
Sign in to follow this  

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

GameDev.net is your game development community. Create an account for your GameDev Portfolio and participate in the largest developer community in the games industry.

Sign me up!