Im having a weird problem.... :(

Started by Elias Montoya, October 24, 2007, 05:55:10 PM

Previous topic - Next topic

Elias Montoya


I am not receiving the WM_PAINT message for my form. I just receive it once,
when the form is first displayed, and then... no more.

What can i be doing wrong?

I receive correctly other messages, except for WM_PAINT.


TechSupport

How do you know that you are not getting the WM_PAINT ? Maybe you are handling the paint message in the dedicated WM_PAINT message handler and are also trying to handle it in the CUSTOM message handler?

Elias Montoya


I put a BEEP on both, it only fires one. Once. The first time. then... nothing. Everything repaints correctly, even if i drag the window off screen and then back on screen, no beeps.
No nothing. :(

TechSupport

Instead of testing for a Beep, try incrementing and showing a static variable. For example:


Function FORM1_WM_PAINT ( _
                        hWndForm      As Dword _  ' handle of Form
                        ) As Long
                       
                       
   Static x As Long
   
   Incr x                     
   FF_Control_SetText hWndForm, Str$(x)
   
End Function



Elias Montoya


Thats what i was trying to do in the beggining, updating the value of a variable and the text of a control.
Since it wasnt happening, i tried the beep. Ill try to send you part of the code later today (since its a customer's
private app, i couldnt send it right away).

:)