Subclassing Question *Resolved*
Hi,
I havent used subclassing much before, but I'm trying to stop picturebox control from being painted (long story, dont think its relevent to the Q).
I've subclassed the picturebox and when i receive a WM_PAINT message, can i just disguard it? I want all the other messages to work as normal. Ive tried this...
VB Code:
Public Function WindProc(ByVal hwnd As Long, ByVal wMsg As Long, ByVal wParam As Long, ByVal lParam As Long) As Long
If Not wMsg = WM_PAINT Then
WindProc = CallWindowProc(WndProcOld&, hwnd&, wMsg&, wParam&, lParam&)
End If
Debug.Print wMsg, Now
End Function
...but the debug window gets printed with loads of '15's over and over and over, which doesnt seem right. I'm a bit clueless here, can anyone point me in the right direction?:confused:
Thanks,
Illspirit