Hi,

I'm trying to figure out the equivalent of the .Cls function in VB which clears the dc for which it is called but I'm not having any luck.

I am subclassing a form and thought I could just do a PostMessage to the form's hWnd with "WM_PAINT" as the message parameter, but that doesn't seem to be enough.

Just to confirm, I created a form with a command button on it and put the code: Me.Cls and then looked at it with Spy++ and it seems that the only message getting processed was WM_PAINT.

So why is posting the "WM_PAINT" message not enough?

Any help would be appreciated..

Dan