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.

132 lines
5.5 KiB

  1. #ifndef _desktop_h
  2. #define _desktop_h
  3. #include <desktray.h>
  4. // REVIEW: does not seem to be used...
  5. // #define DTM_SIZEDESKTOP (WM_USER + 75)
  6. // #define DTM_EXITWINDOWS (WM_USER + 78)
  7. #define DTM_THREADEXIT (WM_USER + 76)
  8. #define DTM_SAVESTATE (WM_USER + 77)
  9. #define DTM_SHELLSERVICEOBJECTS (WM_USER + 79)
  10. #define DTM_STARTWAIT (WM_USER + 80)
  11. #define DTM_ENDWAIT (WM_USER + 81)
  12. #define DTM_RELEASEPROXYDESKTOP (WM_USER + 82)
  13. #define DTM_RAISE (WM_USER + 83)
  14. #define DTRF_RAISE 0
  15. #define DTRF_LOWER 1
  16. #define DTRF_QUERY 2 // to avoid sending a message to a hung desktop, query passes hwndTray in wParam, and desktop send TRAY a TM_DESKTOPSTATE message
  17. #define DTM_ADDREFPROXYDESKTOP (WM_USER + 84)
  18. #define DTM_CREATESAVEDWINDOWS (WM_USER + 85)
  19. #define DTM_ENUMBANDS (WM_USER + 86)
  20. #ifdef DEBUG
  21. #define DTM_NEXTCTL (WM_USER + 87)
  22. #endif
  23. #define DTM_UIACTIVATEIO (WM_USER + 88)
  24. #define DTM_ONFOCUSCHANGEIS (WM_USER + 89)
  25. #define DTM_SETUPAPPRAN (WM_USER + 90) // NT 5 USER posts this message to us
  26. // END OF IE 4.00 / 4.01 MESSAGES
  27. // BEGINNING OF IE 5.00 MESSAGES
  28. #define DTM_GETVIEWAREAS (WM_USER + 91) // View area is WorkArea minus toolbar areas.
  29. #define DTM_DESKTOPCONTEXTMENU (WM_USER + 92)
  30. #define DTM_UPDATENOW (WM_USER + 93)
  31. #define DTM_QUERYHKCRCHANGED (WM_USER + 94) // ask the desktop if HKCR has changed
  32. #define DTM_MAKEHTMLCHANGES (WM_USER + 95) // Make changes to desktop html using dynamic HTML
  33. #define DTM_STARTPAGEONOFF (WM_USER + 96) // Turn on/off the StartPage.
  34. #define DTM_REFRESHACTIVEDESKTOP (WM_USER + 97) // Refresh the active desktop.
  35. #define DTM_SETAPPSTARTCUR (WM_USER + 98) // UI feedback that we are starting an explorer window.
  36. #define COF_NORMAL 0x00000000
  37. #define COF_CREATENEWWINDOW 0x00000001 // "/N"
  38. #define COF_USEOPENSETTINGS 0x00000002 // "/A"
  39. #define COF_WAITFORPENDING 0x00000004 // Should wait for Pending
  40. #define COF_EXPLORE 0x00000008 // "/E"
  41. #define COF_NEWROOT 0x00000010 // "/ROOT"
  42. #define COF_ROOTCLASS 0x00000020 // "/ROOT,<GUID>"
  43. #define COF_SELECT 0x00000040 // "/SELECT"
  44. #define COF_AUTOMATION 0x00000080 // The user is trying to use automation
  45. #define COF_OPENMASK 0x000000FF
  46. #define COF_NOTUSERDRIVEN 0x00000100 // Not user driven
  47. #define COF_NOTRANSLATE 0x00000200 // Don't ILCombine(pidlRoot, pidl)
  48. #define COF_INPROC 0x00000400 // not used
  49. #define COF_CHANGEROOTOK 0x00000800 // Try Desktop root if not in our root
  50. #define COF_NOUI 0x00001000 // Start background desktop only (no folder/explorer)
  51. #define COF_SHDOCVWFORMAT 0x00002000 // indicates this struct has been converted to abide by shdocvw format.
  52. // this flag is temporary until we rip out all the
  53. #define COF_NOFINDWINDOW 0x00004000 // Don't try to find the window
  54. #define COF_HASHMONITOR 0x00008000 // pidlRoot in IETHREADPARAM struct contains an HMONITOR
  55. #ifdef UNIX
  56. #define COF_HELPMODE 0x00010000 // grabbed from IETHREAD.H (for completeness)
  57. #endif
  58. #define COF_SEPARATEPROCESS 0x00020000 // Start in a new process
  59. #define COF_SHELLFOLDERWINDOW 0x01000000 // This is a folder window, don't append - Microsoft Internet... when no pidl...
  60. #define COF_PARSEPATHW 0x02000000 // the NFI.pszPath needs to be parsed but it is UNICODE
  61. #define COF_FIREEVENTONDDEREG 0x20000000 // Fire an event when DDE server is registered
  62. #define COF_FIREEVENTONCLOSE 0x40000000 // Fire an event when browser window closes
  63. #define COF_IEXPLORE 0x80000000
  64. // this is used by DTM_QUERYHKCRCHANGED and the OpenAs Dialog
  65. // because the OpenAs Dialog is always in a separate process,
  66. // and it needs to cache a cookie in the desktop for the DTM
  67. // the QHKCRID is passed as the wParam in the message.
  68. typedef enum
  69. {
  70. QHKCRID_NONE = 0,
  71. QHKCRID_MIN = 1,
  72. QHKCRID_OPENAS = QHKCRID_MIN,
  73. QHKCRID_VIEWMENUPOPUP,
  74. QHKCRID_MAX
  75. } QHKCRID;
  76. // didnt add PARSEPATHA because only browseui adds it, and it is UNICODE
  77. // but might need it later...
  78. #define COF_PARSEPATH COF_PARSEPATHW
  79. typedef struct
  80. {
  81. LPSTR pszPath;
  82. LPITEMIDLIST pidl;
  83. UINT uFlags; // COF_ bits, (shared with IETHREADPARAM.uFlags
  84. int nShow;
  85. HWND hwndCaller;
  86. DWORD dwHotKey;
  87. LPITEMIDLIST pidlSelect; // Only used if COF_SELECT
  88. LPSTR pszRoot; // Only used for Parse_CmdLine
  89. LPITEMIDLIST pidlRoot; // Only used if COF_NEWROOT
  90. CLSID clsid; // Only used if COF_NEWROOT
  91. CLSID clsidInProc; // Only used if COF_INPROC
  92. } NEWFOLDERINFO, *PNEWFOLDERINFO;
  93. STDAPI_(HANDLE) SHCreateDesktop(IDeskTray* pdtray);
  94. STDAPI_(BOOL) CreateFromDesktop(PNEWFOLDERINFO pfi);
  95. STDAPI_(BOOL) SHCreateFromDesktop(PNEWFOLDERINFO pfi);
  96. STDAPI_(BOOL) SHDesktopMessageLoop(HANDLE hDesktop);
  97. STDAPI_(BOOL) SHExplorerParseCmdLine(PNEWFOLDERINFO pfi);
  98. #define IDT_DDETIMEOUT 1
  99. #define IDT_ENUMHKCR 2
  100. // for the desktop to handle DDE
  101. STDAPI_(LRESULT) DDEHandleMsgs(HWND hwnd, UINT uMsg, WPARAM wParam, LPARAM lParam);
  102. STDAPI_(void) DDEHandleTimeout(HWND hwnd);
  103. #endif