Randall,
a possible work around about %WM_PAINT is to clear the message queue of the window using ClearMessages(hDlg) where hDlg is the handle of the window.
ClearMessages(hDlg) is a unique thinBasic command (not a standard Windows behave) used to clear the internal queue thinBasic store for every window. So write something like:
[code=thinbasic]
CASE %WM_PAINT
Call Paint_Grid_Window()
Call Paint_Draw_Mode_Legend()
ClearMessages(hDlg)
[/code]
so script will clear the window message queue avoiding to return so many %WM_PAINT
As I said, it is a trick and not a standard or general behave to be used other than in thinBasic script.
Hope it makes some difference.
I'm looking at UI module in order to find an official way to get it working correctly. %WM_PAINT message are in reality fired by windows but each belonging to different child windows. So I need to trap them all and fire only the relevant ones.
Ciao
Eros
Bookmarks