public void CheckBoxGetKeyBoardFocus() { if (hWnd != IntPtr.Zero) { WinAPI.SendMessage(hWnd, (uint)TASKDIALOG_MESSAGES.TDM_CLICK_VERIFICATION, _CheckBoxChecked ? (IntPtr)1 : IntPtr.Zero, (IntPtr)1); } }
private void UpdateControlsOnCreate() { WinAPI.SendMessage(hWnd, (uint)TASKDIALOG_MESSAGES.TDM_SET_PROGRESS_BAR_POS, (IntPtr)_ProgressBarValue, IntPtr.Zero); WinAPI.SendMessage(hWnd, (uint)TASKDIALOG_MESSAGES.TDM_SET_PROGRESS_BAR_STATE, (IntPtr)_ProgressBarState, IntPtr.Zero); WinAPI.SendMessage(hWnd, (uint)TASKDIALOG_MESSAGES.TDM_SET_MARQUEE_PROGRESS_BAR, _MarqueeProgressBar ? (IntPtr)1 : IntPtr.Zero, IntPtr.Zero); WinAPI.SendMessage(hWnd, (uint)TASKDIALOG_MESSAGES.TDM_SET_PROGRESS_BAR_MARQUEE, _MarqueeDisplayStarted ? (IntPtr)1 : IntPtr.Zero, IntPtr.Zero); foreach (TaskDialogButton btn in Buttons) { if (!btn.Enabled) { WinAPI.SendMessage(hWnd, (uint)TASKDIALOG_MESSAGES.TDM_ENABLE_BUTTON, (IntPtr)btn.Config.nButtonID, IntPtr.Zero); } if (btn.ShowShield) { WinAPI.SendMessage(hWnd, (uint)TASKDIALOG_MESSAGES.TDM_SET_BUTTON_ELEVATION_REQUIRED_STATE, (IntPtr)btn.Config.nButtonID, (IntPtr)1); } } foreach (TaskDialogRadioButton btn in RadioButtons) { if (!btn.Enabled) { WinAPI.SendMessage(hWnd, (uint)TASKDIALOG_MESSAGES.TDM_ENABLE_RADIO_BUTTON, (IntPtr)btn.Config.nButtonID, IntPtr.Zero); } } }
public static void DragWindow(IntPtr hwnd) { WinAPI.ReleaseCapture(); WinAPI.SendMessage(hwnd, Constants.WM_SYSCOMMAND, (IntPtr)(Constants.SC_MOVE + Constants.HTCAPTION), IntPtr.Zero); }
public static void ShowShield(IntPtr buttonHandle, bool showShield) { WinAPI.SendMessage(buttonHandle, Constants.BCM_SETSHIELD, IntPtr.Zero, showShield ? (IntPtr)1 : IntPtr.Zero); }