PlanetSquires Forums

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: WM_PAINT and Dialog backgrounds.  (Read 321 times)

Elias Montoya

  • Guest
WM_PAINT and Dialog backgrounds.
« on: October 21, 2006, 10:34: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:

Code: [Select]
                               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                              
   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...



  • Guest
WM_PAINT and Dialog backgrounds.
« Reply #1 on: October 22, 2006, 03:19: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.


Elias Montoya

  • Guest
WM_PAINT and Dialog backgrounds.
« Reply #2 on: October 24, 2006, 03:10:28 PM »

Ok ill send it. :)