Andrea,
>I'm working with C# and I'm overriding the WindowProcedure the catch
>the WM_MOVING message. How can I convert the lParam object passed by
>the Message to a Rectangle so that I can change its dimensions and
>pass it back to lParam?
Marshal.PtrToStructure, and then Marshal.StructureToPtr to copy it
back.
Message.GetLParam provides a shortcut for Marshal.PtrToStructure.
Since you're working in C#, another option is to use unsafe code and
real pointers (cast the lParam IntPtr to a RECT*).
Mattias

Signature
Mattias Sjögren [MVP] mattias @ mvps.org
http://www.msjogren.net/dotnet/ | http://www.dotnetinterop.com
Please reply only to the newsgroup.