Advertisement

06.20.2008 at 09:33PM PDT, ID: 23504174
[x]
Attachment Details

Capture Windows form paint messages

Asked by superg65 in Visual Basic Programming, Windows Programming

Tags: vb6, Windows Programming

Hi Experts

I have a  standard frame on a form with a background drawn via BitBlt.  The form is maximised and covers the whole desktop area but the frame is only covering a part of my form. If another application gets the focus (ie the user decides to switch apps) and is moved or resized over the frame, the background portion of the frame where the other application has overlayed it gets redrawn. The redrawn portion is painted with the background colour property colour and not my BitBlt  image.

What I want to do is either
a) detect that another app has focus and is redrawn, moved  or sized over my app (in particular over my frame but just over my app would be enough); or
b) detect that part of my frame has been redrawn.

Once I have this I will call a redraw of my frame backgound BitBlt to repair the portion redrawn because of the other app.

I do not understand enough about how Windows redraws the portion under an app that is resizing to know how to do this.

Looking for a subclass/hook solution or ideas on which windows message to look for. No timer stuff please.

Thanks in advance
GraemeStart Free Trial
 
 
[+][-]06.20.2008 at 11:54PM PDT, ID: 21836671

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.21.2008 at 03:09PM PDT, ID: 21839032

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.21.2008 at 04:02PM PDT, ID: 21839153

Often, when Experts are collaborating with members who have asked questions, they will request additional information about the problem. Askers respond with an author comment like this one.

Start your 7-day free trial to view this Author Comment or ask the Experts your question.

 
[+][-]06.21.2008 at 04:22PM PDT, ID: 21839191

At Experts Exchange, members can ask their questions to thousands of technology professionals, also known as Experts. Experts compete and collaborate to answer those questions by leaving comments like this one.

Start your 7-day free trial to view this Expert Comment or ask the Experts your question.

 
[+][-]06.21.2008 at 08:05PM PDT, ID: 21839549

View this solution now by starting your 7-day free trial. Setting up your free trial is quick, easy, and secure. We will return you to this solution, unlocked, when you're done.

 

About this solution

Zones: Visual Basic Programming, Windows Programming
Tags: vb6, Windows Programming
Sign Up Now!
Solution Provided By: zzzzzooc
Participating Experts: 2
Solution Grade: A
 
 
 
Loading Advertisement...
20080716-EE-VQP-32 / EE_QW_2_20070628