Source code of Windows XP (NT5)
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

46 lines
1.4 KiB

  1. /*******************************************************************
  2. * DESCRIPTION: ToggleKeys dialog
  3. *******************************************************************/
  4. #include "Access.h"
  5. // *******************************************************************
  6. // Toggle Keys Settings handler
  7. // *******************************************************************
  8. INT_PTR CALLBACK ToggleKeySettingsDlg (HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam) {
  9. BOOL fProcessed = TRUE;
  10. switch (uMsg) {
  11. case WM_INITDIALOG:
  12. CheckDlgButton(hwnd, IDC_TK_HOTKEY,
  13. (g_tk.dwFlags & TKF_HOTKEYACTIVE)?TRUE:FALSE );
  14. break;
  15. case WM_HELP:
  16. WinHelp(((LPHELPINFO) lParam)->hItemHandle, __TEXT("access.hlp"), HELP_WM_HELP, (DWORD_PTR) (LPSTR) g_aIds);
  17. break;
  18. case WM_CONTEXTMENU:
  19. WinHelp((HWND) wParam, __TEXT("access.hlp"), HELP_CONTEXTMENU, (DWORD_PTR) (LPSTR) g_aIds);
  20. break;
  21. case WM_COMMAND:
  22. switch (GET_WM_COMMAND_ID(wParam, lParam)) {
  23. case IDC_TK_HOTKEY:
  24. g_tk.dwFlags ^= MKF_HOTKEYACTIVE;
  25. SendMessage(GetParent(hwnd), PSM_CHANGED, (WPARAM) hwnd, 0);
  26. break;
  27. case IDOK: case IDCANCEL:
  28. EndDialog(hwnd, GET_WM_COMMAND_ID(wParam, lParam)); break;
  29. }
  30. break;
  31. default: fProcessed = FALSE; break;
  32. }
  33. return(fProcessed);
  34. }
  35. ///////////////////////////////// End of File /////////////////////////////////