Beispiel #1
0
        public static int SendMessageToMainWindow(int Msg, int wParam, ref MyLParam lParam)
        {
            if (MainWindowPtr == IntPtr.Zero)
            {
                HwndSource hwndSource = PresentationSource.FromVisual(Application.Current.MainWindow) as HwndSource;
                MainWindowPtr = hwndSource.Handle;
            }

            return(SendMessage(MainWindowPtr, Msg, wParam, ref lParam));
        }
Beispiel #2
0
 public static extern int SendMessage(IntPtr hWnd, int Msg, int wParam, ref MyLParam lParam);