According to MSDN docs on InvalidateRect API (found here http://msdn.microsoft.com/en-us/libr...=vs.85%29.aspx ) it says:
lpRect [in]
A pointer to a RECT structure that contains the client coordinates of the rectangle to be added to the update region. If this parameter is NULL, the entire client area is added to the update region.
Now my declaration is:
So I'm trying to figure out how do I pass NULL as it says in MSDN docs to the lpRect parameter of the InvalidateRect function? Do I need to change RECT to Long? Do I need to also need change ByRef to ByVal? I think I need to do both of these, and then pass 0 or 0& or vbnullstring to it (all ways I've seen posted on these forums in various places involving different API calls), but I'm not entirely sure. I've tried all of these, and they all seem to cause it to properly refresh the whole screen (exactly as I'm trying to do). But while they all seem to work, I'm guessing only one of them is the "proper" way to pass NULL to the lpRect parameter of this function. And I'm guessing that all other ways could potentially lead to a glitch or something if I keep doing it enough. Can someone please tell me the proper way to pass NULL to the lpRect parameter of the InvalidateRect API function?
Quote:
lpRect [in]
A pointer to a RECT structure that contains the client coordinates of the rectangle to be added to the update region. If this parameter is NULL, the entire client area is added to the update region.
Code:
Private Declare Function InvalidateRect Lib "user32.dll" (ByVal hwnd As Long, ByRef lpRect As RECT, ByVal bErase As Long) As Long