PlanetSquires Forums

Support Forums => Other Software and Code => Topic started by: Elias Montoya on October 21, 2006, 11:04:55 PM

Title: WM_PAINT and Dialog backgrounds.
Post by: Elias Montoya on October 21, 2006, 11:04:55 PM
I have a dialog with a bitmap background, probably the same you saw
before, and in that dialog i am trapping the WM_PAINT message to bitblt
a bitmap over the dialog.

The bitmap needs to be refreshed 30 times per second. Everything works
fine except when dialog is dragged around, then, bitmap flickers.

If i capture WM_ERASEBACKGND like this:

Function PICTURECAPTURE_CUSTOM ( _
                              hWndForm      As Dword, _  ' handle of Form
                              wMsg          As Long,  _  ' type of message
                              wParam        As Dword, _  ' first message parameter
                              lParam        As Long   _  ' second message parameter
                              ) As Long
Select Case wMsg                              
 Case %WM_ERASEBKGND  
  Function = %true
End Select
End Function


Then Image that is BitBlt'ed does not flicker, but dialog background is not displayed. Any ideas how can i get dialog backgrounds without flicker with my WM_PAINT procedure?

I know i can paint background my self, but i would like to know if there is
a workaround so i can focus in drawing only my stuff and leaving
background job on Firefly...

:)
Title: WM_PAINT and Dialog backgrounds.
Post by: TechSupport on October 22, 2006, 03:49:25 PM
You may want to email me the code so that I can play with the code generation to see what combination works best.

:)
Title: WM_PAINT and Dialog backgrounds.
Post by: Elias Montoya on October 24, 2006, 03:40:28 PM
Ok ill send it. :)