예제 #1
0
        static HwndSubclass()
        {
            DetachMessage = UnsafeNativeMethods.RegisterWindowMessage("HwndSubclass.DetachMessage");

            // Go find the address of DefWindowProc.
            IntPtr hModuleUser32 = UnsafeNativeMethods.GetModuleHandle(ExternDll.User32);
            IntPtr address       = UnsafeNativeMethods.GetProcAddress(new HandleRef(null, hModuleUser32), "DefWindowProcW");

            DefWndProc = address;
        }
예제 #2
0
 static HwndWrapper()
 {
     s_msgGCMemory = UnsafeNativeMethods.RegisterWindowMessage("HwndWrapper.GetGCMemMessage");
 }