private int DialogProc( IntPtr hwnd, uint msg, IntPtr wParam, IntPtr lParam, IntPtr lpRefData) { // Fetch the HWND - it may be the first time we're getting it. hWndDialog = hwnd; // Big switch on the various notifications the // dialog proc can get. switch ((TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS)msg) { case TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_CREATED: int result = PerformDialogInitialization(); outerDialog.RaiseOpenedEvent(); return(result); case TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_BUTTON_CLICKED: return(HandleButtonClick((int)wParam)); case TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_RADIO_BUTTON_CLICKED: return(HandleRadioButtonClick((int)wParam)); case TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_HYPERLINK_CLICKED: return(HandleHyperlinkClick(lParam)); case TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_HELP: return(HandleHelpInvocation()); case TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_TIMER: return(HandleTick((int)wParam)); case TaskDialogNativeMethods.TASKDIALOG_NOTIFICATIONS.TDN_DESTROYED: return(PerformDialogCleanup()); default: break; } return((int)HRESULT.S_OK); }
private int DialogProc( IntPtr windowHandle, uint message, IntPtr wparam, IntPtr lparam, IntPtr referenceData) { // Fetch the HWND - it may be the first time we're getting it. hWndDialog = windowHandle; // Big switch on the various notifications the // dialog proc can get. switch ((TaskDialogNativeMethods.TaskDialogNotifications)message) { case TaskDialogNativeMethods.TaskDialogNotifications.Created: int result = PerformDialogInitialization(); outerDialog.RaiseOpenedEvent(); return(result); case TaskDialogNativeMethods.TaskDialogNotifications.ButtonClicked: return(HandleButtonClick((int)wparam)); case TaskDialogNativeMethods.TaskDialogNotifications.RadioButtonClicked: return(HandleRadioButtonClick((int)wparam)); case TaskDialogNativeMethods.TaskDialogNotifications.HyperlinkClicked: return(HandleHyperlinkClick(lparam)); case TaskDialogNativeMethods.TaskDialogNotifications.Help: return(HandleHelpInvocation()); case TaskDialogNativeMethods.TaskDialogNotifications.Timer: return(HandleTick((int)wparam)); case TaskDialogNativeMethods.TaskDialogNotifications.Destroyed: return(PerformDialogCleanup()); default: break; } return((int)HResult.Ok); }