When I do this using these API calls the TextOut, GetDesktopWindow, GetWindowDC, and ReleaseDC:
I find that the text is drawn to the upperleft corner of the computer monitor (regardless of what is normally displayed there). That is as expected. When I find though is that it remains there, until something (like another window) is dragged over it, forcing the OS to refresh those pixels and clear the text. However I would like to do this programatically. I want to know what API function I can call that forces the OS to refresh the whole screen, upon calling said API function. Is there such an API function?
Code:
dim MyWnd as long
dim MyDC as long
MyWnd=getdesktopwindow
MyDC=getwindowdc(MyWnd)
TextOut MyDC,0,0,"test",4
releasedc MyWnd,MyDC