OK.
First, the declare makes use of a method from WFS, so either drag WFS in the project, or add :
[code]Private Function SendMessage(hwnd as Integer, msg as Integer, wParam as Integer, lParam as Integer) As Integer
#if TargetWin32
Soft Declare Function SendMessageA Lib "User32" ( hwnd as Integer, msg as Integer, wParam as Integer, lParam as Integer ) as Integer
Soft Declare Function SendMessageW Lib "User32" ( hwnd as Integer, msg as Integer, wParam as Integer, lParam as Integer ) as Integer
if System.IsFunctionAvailable( "SendMessageW", "User32" ) then
return SendMessageW( hwnd, msg, wParam, lParam )
else
return SendMessageA( hwnd, msg, wParam, lParam )
end if
#else
#pragma unused hwnd
#pragma unused msg
#pragma unused wParam
#pragma unused lParam
#endif
End Function
[/code]
Second, I needed it for a ContainerControl that was flickering like a Christmas tree while controls were drawn. Unfortunately, the magic pill did not do.
The solution I found was to start the ContainerControl invisible, and with a 500 ms single timer, make it visible afterward. Flicker disappeared.
It is quite possible that this works better for straight windows. I’ll keep this in my bag of tricks for future use anyway. I don’t think flicker reduction is simple enough to use only one recipe.