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.

73 lines
1.8 KiB

  1. #include "priv.h"
  2. #include "shbrows2.h"
  3. #include "commonsb.h"
  4. #include "resource.h"
  5. //
  6. //
  7. // If you want NT5 defines in the above headerfiles, you gotta set _WIN32_WINNT
  8. // to 0x0500, which the standard browseui build does not do...
  9. //
  10. // So we do it here in nt5.cpp.
  11. //
  12. //
  13. // WM_APPCOMMAND handling
  14. //
  15. typedef struct tagAppCmd
  16. {
  17. UINT idAppCmd;
  18. UINT idCmd;
  19. } APPCMD;
  20. BOOL CShellBrowser2::_OnAppCommand(WPARAM wParam, LPARAM lParam)
  21. {
  22. static APPCMD rgcmd[] =
  23. {
  24. { APPCOMMAND_BROWSER_BACKWARD, FCIDM_NAVIGATEBACK },
  25. { APPCOMMAND_BROWSER_FORWARD, FCIDM_NAVIGATEFORWARD },
  26. { APPCOMMAND_BROWSER_REFRESH, FCIDM_REFRESH },
  27. { APPCOMMAND_BROWSER_STOP, FCIDM_STOP },
  28. { APPCOMMAND_BROWSER_SEARCH, FCIDM_VBBSEARCHBAND }, // FCIDM_SEARCHPAGE ?
  29. { APPCOMMAND_BROWSER_FAVORITES, FCIDM_VBBFAVORITESBAND },
  30. { APPCOMMAND_BROWSER_HOME, FCIDM_STARTPAGE },
  31. { APPCOMMAND_LAUNCH_MAIL, FCIDM_MAIL }
  32. };
  33. UINT idAppCmd = GET_APPCOMMAND_LPARAM(lParam);
  34. BOOL bRet = FALSE;
  35. for (int i = 0 ; i < ARRAYSIZE(rgcmd) ; i++)
  36. {
  37. if (rgcmd[i].idAppCmd == idAppCmd)
  38. {
  39. OnCommand(GET_WM_COMMAND_MPS(rgcmd[i].idCmd,
  40. GET_WM_COMMAND_HWND(wParam, lParam),
  41. GET_WM_COMMAND_CMD(wParam, lParam)));
  42. bRet = TRUE;
  43. break;
  44. }
  45. }
  46. return bRet;
  47. }
  48. // Our NT5 version of the WndProc
  49. //
  50. LPARAM CShellBrowser2::_WndProcBSNT5(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam)
  51. {
  52. LPARAM lRet = 0;
  53. switch(uMsg)
  54. {
  55. case WM_APPCOMMAND:
  56. {
  57. if (_OnAppCommand(wParam, lParam))
  58. lRet = 1;
  59. break;
  60. }
  61. default:
  62. break;
  63. }
  64. return lRet;
  65. }