Leaked source code of windows server 2003
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.

47 lines
1.4 KiB

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