internal IntPtr InitializeFromFirstMessage(IntPtr hwnd, int message, IntPtr wParam, IntPtr lParam)
{
_hwnd = new HWND(hwnd);
// Replace the window proceedure for this window instance.
IntPtr wndProc = Marshal.GetFunctionPointerForDelegate(_wndProc);
NativeMethods.SetWindowLongPtr(_hwnd, GWL.WNDPROC, wndProc);
// Give the window a chance to initialize.
Initialize();
// Manually invoke the window proceedure for this message.
return OnMessage((WM)message, wParam, lParam);
}