C
crafuse
Hello,
I've overridden the WndProc function in my form to hand some special
behavior. Specifically, I look for the WM_NCMOUSEMOVE event to tell me
when the user is trying to move the window by draggin the title bar.
However, I am having trouble extracting the POINT structure that is
supposed to come with the message. For example:
Structure POINTS
Public x As Short
Public y As Short
End Structure
....
IF m.Msg = WM_NCMOUSEMOVE Then
Dim mousePos as New POINTS =
System.Runtime.Interopservices.Marshal.PtrToStructure(m.LParam,
GetType(POINTS))
....
End If
I continually receive a Null assignment exception. Is there a
diff/proper way to extact the POINTS struct that is supposed to come
with the System.Windows.Forms.Message structure?
I've overridden the WndProc function in my form to hand some special
behavior. Specifically, I look for the WM_NCMOUSEMOVE event to tell me
when the user is trying to move the window by draggin the title bar.
However, I am having trouble extracting the POINT structure that is
supposed to come with the message. For example:
Structure POINTS
Public x As Short
Public y As Short
End Structure
....
IF m.Msg = WM_NCMOUSEMOVE Then
Dim mousePos as New POINTS =
System.Runtime.Interopservices.Marshal.PtrToStructure(m.LParam,
GetType(POINTS))
....
End If
I continually receive a Null assignment exception. Is there a
diff/proper way to extact the POINTS struct that is supposed to come
with the System.Windows.Forms.Message structure?