RedrawWindow

Please excuse me but I’m, a delphi programer drying to do C++ stuff you could say
The reason I’m doing all this is the Delphi paint procedures cannot be accessed or over ridden
so I have to make a separate procedure of my own, The objective is remove flicker from the WM_ERASEBKGND message
And that means not to use WM_Paint in my case as that locks in a WM_ERASEBKGND message.

Reading MS web site RedrawWindow RedrawWindow function (winuser.h) - Win32 apps | Microsoft Learn

I do not understand lprcUpdate [in] A pointer to a RECT structure containing the coordinates, in device units, of the update rectangle.
Is this based on the screen coordinates, form coordinates or what?

hrgnUpdate [in] A handle to the update region. I have a DC, A HWND or handle, I have TopLeft form coordinates to the area I want to paint
How does one get a hrgnUpdate

Flags
I want to use RDW_NOERASE to stop any WM_ERASEBKGND message
I want use the RDW_NOINTERNALPAINT and same procedure to do the painting and not use a WM_Paint messages
Dose RDW_INVALIDATE give me the right to paint on my canvas

The easiest thing to do is to add a message handler for WM_ERASEBKGND to the window and return Message.Result := 1 to prevent windows from clearing the window.
The 5th post in this topic has a complete example of using forms with OpenGL:
https://www.opengl.org/discussion_boards/showthread.php/166198-Delphi-OpenGL-not-working-GL_MULTISAMPLE_ARB

This topic was automatically closed 183 days after the last reply. New replies are no longer allowed.