public void SendCommandMessage(TASKDIALOG_MESSAGES message, IntPtr wParam, IntPtr lParam) { if (this.WindowHandle == IntPtr.Zero) { throw new InvalidOperationException("windowHandle == null"); } WindowsNativeMethods.SendMessage(this.WindowHandle, (uint)message, wParam, lParam); }
private static extern int SendMessage(IntPtr hwnd, TASKDIALOG_MESSAGES msg, int wParam, int lParam);
private void SendMessage(TASKDIALOG_MESSAGES msg, int wParam, int lParam) { SendMessage(hwnd, msg, wParam, lParam); }