View unanswered posts | View active topics It is currently Thu Sep 18, 2014 3:40 pm



Reply to topic  [ 4 posts ] 
 windows resizing 
Author Message

Joined: Tue Oct 26, 2004 7:01 am
Posts: 7
Post windows resizing
In my windows program I am making, when I resize the window the text disappears then when I am done resizing it re-appears. I am still having a little trouble with understanding exactly what is going on with windows thats causes this. When a window is resized a WM_PAINT message is one of the messages that is sent, right? In my event handler for WM_PAINT all I do is validate the window. In winMain is where I do all the textout stuff. So if the event handler for WM_PAINT does not do any rendering to the window, why does the screen get erased? Is some default windows processing going on since I am not doing something for a resize message being sent?


Wed Oct 11, 2006 11:59 am
Profile WWW
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 291
Post windows resizing
MAke sure the background brush is null. Also, if you don't repaint screen yourself, windows can do it for you under certain circumstances.

Andre'


Wed Oct 11, 2006 8:31 pm
Profile WWW

Joined: Tue Oct 26, 2004 7:01 am
Posts: 7
Post windows resizing
I have the background set to black brush in the WINCLASSEX struct, wc.hbrBackground = (HBRUSH)GetStockObject(BLACK_BRUSH);

So when would I want to set the brush to null? Why might this fix the problem?


Thu Oct 12, 2006 1:54 am
Profile WWW
Site Admin
User avatar

Joined: Thu Jan 01, 1970 12:00 am
Posts: 291
Post windows resizing
Hmmm, well, black or null. If you do the validate wrong then its possible it will redraw, so that might be the problem, null the brush, then it shouldn't do anything even if you made an error.

Andre'


Thu Oct 12, 2006 6:51 pm
Profile WWW
Display posts from previous:  Sort by  
Reply to topic   [ 4 posts ] 

Who is online

Users browsing this forum: No registered users and 0 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB © 2000, 2002, 2005, 2007 phpBB Group.
Designed by STSoftware.