Пример #1
0
 public void CheckBoxGetKeyBoardFocus()
 {
     if (hWnd != IntPtr.Zero)
     {
         WinAPI.SendMessage(hWnd, (uint)TASKDIALOG_MESSAGES.TDM_CLICK_VERIFICATION, _CheckBoxChecked ? (IntPtr)1 : IntPtr.Zero, (IntPtr)1);
     }
 }
Пример #2
0
        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);
                }
            }
        }
Пример #3
0
 public static void DragWindow(IntPtr hwnd)
 {
     WinAPI.ReleaseCapture();
     WinAPI.SendMessage(hwnd, Constants.WM_SYSCOMMAND, (IntPtr)(Constants.SC_MOVE + Constants.HTCAPTION), IntPtr.Zero);
 }
Пример #4
0
 public static void ShowShield(IntPtr buttonHandle, bool showShield)
 {
     WinAPI.SendMessage(buttonHandle, Constants.BCM_SETSHIELD, IntPtr.Zero, showShield ? (IntPtr)1 : IntPtr.Zero);
 }