diff --git a/reactos/subsys/system/explorer/Seashell/.cvsignore b/reactos/subsys/system/explorer/Seashell/.cvsignore index 9a65f4b5980..161ec452252 100644 --- a/reactos/subsys/system/explorer/Seashell/.cvsignore +++ b/reactos/subsys/system/explorer/Seashell/.cvsignore @@ -1,3 +1,5 @@ +Debug +Release *.coff *.exe *.d diff --git a/reactos/subsys/system/explorer/buildno.h b/reactos/subsys/system/explorer/buildno.h index f7cc327aa00..6c6d3a727b7 100644 --- a/reactos/subsys/system/explorer/buildno.h +++ b/reactos/subsys/system/explorer/buildno.h @@ -1,10 +1,10 @@ /* Do not edit - Machine generated */ #ifndef _INC_REACTOS_BUILDNO #define _INC_REACTOS_BUILDNO -#define KERNEL_VERSION_BUILD 4 -#define KERNEL_VERSION_BUILD_STR "4" -#define KERNEL_RELEASE_RC "0.1.4.4\0" -#define KERNEL_RELEASE_STR "0.1.4.4" +#define KERNEL_VERSION_BUILD 23 +#define KERNEL_VERSION_BUILD_STR "23" +#define KERNEL_RELEASE_RC "0.1.4.23\0" +#define KERNEL_RELEASE_STR "0.1.4.23" #define KERNEL_VERSION_RC "0.1.4\0" #define KERNEL_VERSION_STR "0.1.4" #endif diff --git a/reactos/subsys/system/explorer/desktop/desktop.h b/reactos/subsys/system/explorer/desktop/desktop.h index aa5ded5c74d..26781d5f4b6 100644 --- a/reactos/subsys/system/explorer/desktop/desktop.h +++ b/reactos/subsys/system/explorer/desktop/desktop.h @@ -26,6 +26,7 @@ // + /// subclassed Background window behind the visible desktop window struct BackgroundWindow : public SubclassedWindow { typedef SubclassedWindow super; @@ -37,6 +38,7 @@ protected: }; + /// Implementation of the Explorer desktop window struct DesktopWindow : public Window, public IShellBrowserImpl { typedef Window super; diff --git a/reactos/subsys/system/explorer/dialogs/searchprogram.h b/reactos/subsys/system/explorer/dialogs/searchprogram.h index f956a783112..cabf8405c17 100644 --- a/reactos/subsys/system/explorer/dialogs/searchprogram.h +++ b/reactos/subsys/system/explorer/dialogs/searchprogram.h @@ -64,6 +64,7 @@ protected: }; + /// entry for the list in "find program" dialogs struct FPDEntry { ShellEntry* _shell_entry; diff --git a/reactos/subsys/system/explorer/doxy-footer.html b/reactos/subsys/system/explorer/doxy-footer.html index 4e7116e8e93..577c245c129 100644 --- a/reactos/subsys/system/explorer/doxy-footer.html +++ b/reactos/subsys/system/explorer/doxy-footer.html @@ -3,7 +3,7 @@
ROS Explore Source Code Documentation -
generated on 02.11.2003 by +
generated on 09.11.2003 by
doxygen
diff --git a/reactos/subsys/system/explorer/explorer.dsp b/reactos/subsys/system/explorer/explorer.dsp index 059906a88ee..9bd1c1c9eb2 100644 --- a/reactos/subsys/system/explorer/explorer.dsp +++ b/reactos/subsys/system/explorer/explorer.dsp @@ -362,6 +362,10 @@ SOURCE=.\res\logov.bmp # End Source File # Begin Source File +SOURCE=.\res\logov256.bmp +# End Source File +# Begin Source File + SOURCE=.\res\reactos.ico # End Source File # Begin Source File diff --git a/reactos/subsys/system/explorer/globals.h b/reactos/subsys/system/explorer/globals.h index fb266d66ada..8e2f0c9b18c 100644 --- a/reactos/subsys/system/explorer/globals.h +++ b/reactos/subsys/system/explorer/globals.h @@ -26,6 +26,7 @@ // + /// structure containing global variable of Explorer extern struct ExplorerGlobals { ExplorerGlobals(); @@ -75,6 +76,7 @@ protected: HICON _hIcon; }; + /// convenient loading of icon resources with specified sizes struct ResIconEx { ResIconEx(UINT nid, int w, int h); @@ -85,8 +87,10 @@ protected: HICON _hIcon; }; + /// set big and small icons out of the resources for a window extern void SetWindowIcon(HWND hwnd, UINT nid); + /// convenient loading of bitmap resources struct ResBitmap { ResBitmap(UINT nid); diff --git a/reactos/subsys/system/explorer/shell/entries.h b/reactos/subsys/system/explorer/shell/entries.h index c8dbdc80506..18108c72f91 100644 --- a/reactos/subsys/system/explorer/shell/entries.h +++ b/reactos/subsys/system/explorer/shell/entries.h @@ -85,6 +85,8 @@ public: virtual BOOL launch_entry(HWND hwnd, UINT nCmdShow=SW_SHOWNORMAL); }; + + /// base for all directory entries struct Directory { protected: Directory() : _path(NULL) {} @@ -94,6 +96,7 @@ protected: }; + /// root entry for file system trees struct Root { Root(); ~Root(); diff --git a/reactos/subsys/system/explorer/shell/filechild.h b/reactos/subsys/system/explorer/shell/filechild.h index da4d3f258ba..e49f270f1ac 100644 --- a/reactos/subsys/system/explorer/shell/filechild.h +++ b/reactos/subsys/system/explorer/shell/filechild.h @@ -38,6 +38,7 @@ struct FileChildWndInfo int _open_mode; //OPEN_WINDOW_MODE }; + /// information structure for creation of ShellBrowserChild struct ShellChildWndInfo : public FileChildWndInfo { ShellChildWndInfo(LPCTSTR path, const ShellPath& root_shell_path); @@ -91,6 +92,7 @@ public: }; + /// The "Execute..."-dialog lets the user enter a command line to launch. struct ExecuteDialog { ///@todo use class Dialog TCHAR cmd[MAX_PATH]; int cmdshow; diff --git a/reactos/subsys/system/explorer/shell/pane.h b/reactos/subsys/system/explorer/shell/pane.h index e7a14141b42..67f3c9dcd4e 100644 --- a/reactos/subsys/system/explorer/shell/pane.h +++ b/reactos/subsys/system/explorer/shell/pane.h @@ -44,6 +44,7 @@ enum COLUMN_FLAGS { }; + /// Worker for drawing contents of file lists in child pane struct OutputWorker { OutputWorker(); diff --git a/reactos/subsys/system/explorer/shell/shellbrowser.h b/reactos/subsys/system/explorer/shell/shellbrowser.h index 4926b6cf409..49c500ff81e 100644 --- a/reactos/subsys/system/explorer/shell/shellbrowser.h +++ b/reactos/subsys/system/explorer/shell/shellbrowser.h @@ -29,6 +29,7 @@ #include "../utility/shellbrowserimpl.h" + /// Implementation of IShellBrowserImpl interface in explorer child windows struct ShellBrowserChild : public ChildWindow, public IShellBrowserImpl { typedef ChildWindow super; diff --git a/reactos/subsys/system/explorer/shell/shellfs.cpp b/reactos/subsys/system/explorer/shell/shellfs.cpp index f003f5460ed..ebfc0b0f3a3 100644 --- a/reactos/subsys/system/explorer/shell/shellfs.cpp +++ b/reactos/subsys/system/explorer/shell/shellfs.cpp @@ -326,7 +326,7 @@ void ShellDirectory::read_directory() if (SHGetFileInfo((LPCTSTR)pidl, 0, &sfi, sizeof(sfi), SHGFI_PIDL|SHGFI_ICON|SHGFI_SMALLICON)) entry->_hIcon = sfi.hIcon; - } + } if (!entry->_hIcon) entry->_hIcon = (HICON)-1; // don't try again later diff --git a/reactos/subsys/system/explorer/shell/shellfs.h b/reactos/subsys/system/explorer/shell/shellfs.h index 9fbfe838b7c..1cf36893161 100644 --- a/reactos/subsys/system/explorer/shell/shellfs.h +++ b/reactos/subsys/system/explorer/shell/shellfs.h @@ -46,6 +46,7 @@ protected: }; + /// shell folder entry struct ShellDirectory : public ShellEntry, public Directory { ShellDirectory(ShellFolder& root_folder, const ShellPath& shell_path, HWND hwnd) diff --git a/reactos/subsys/system/explorer/shell/startup.c b/reactos/subsys/system/explorer/shell/startup.c index cd5b7d1d2ec..ec0e4224d80 100644 --- a/reactos/subsys/system/explorer/shell/startup.c +++ b/reactos/subsys/system/explorer/shell/startup.c @@ -16,6 +16,7 @@ * License along with this library; if not, write to the Free Software * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA */ + /* Based on the Wine "bootup" handler application * * This app handles the various "hooks" windows allows for applications to perform @@ -32,16 +33,16 @@ * - Services (NT, ?semi-synchronous?, not implemented yet) * - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServicesOnce (9x, asynch) * - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunServices (9x, asynch) - * + * * After log in * - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\RunOnce (all, synch) * - HKEY_LOCAL_MACHINE\Software\Microsoft\Windows\CurrentVersion\Run (all, asynch) * - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\Run (all, asynch) * - Startup folders (all, ?asynch?, no imp) * - HKEY_CURRENT_USER\Software\Microsoft\Windows\CurrentVersion\RunOnce (all, asynch) - * + * * Somewhere in there is processing the RunOnceEx entries (also no imp) - * + * * Bugs: * - If a pending rename registry does not start with \??\ the entry is * processed anyways. I'm not sure that is the Windows behaviour. @@ -55,7 +56,8 @@ #include #include -/* Performs the rename operations dictated in %SystemRoot%\Wininit.ini. +/** + * Performs the rename operations dictated in %SystemRoot%\Wininit.ini. * Returns FALSE if there was an error, or otherwise if all is ok. */ static BOOL wininit() @@ -198,7 +200,7 @@ static BOOL pendingRename() res=FALSE; } else res=TRUE; - + end: if (buffer!=NULL) free(buffer); @@ -222,7 +224,7 @@ const WCHAR runkeys_names[][30]= }; #define INVALID_RUNCMD_RETURN -1 -/* +/** * This function runs the specified command in the specified dir. * [in,out] cmdline - the command line to run. The function may change the passed buffer. * [in] dir - the dir to run the command in. If it is NULL, then the current dir is used. @@ -270,7 +272,7 @@ static int runCmd(LPWSTR cmdline, LPCWSTR dir, BOOL wait, BOOL minimized) return exit_code; } -/* +/** * Process a "Run" type registry key. * hkRoot is the HKEY from which "Software\Microsoft\Windows\CurrentVersion" is * opened. @@ -318,7 +320,7 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete, goto end; } - + if ((res=RegQueryInfoKeyW(hkRun, NULL, NULL, NULL, NULL, NULL, NULL, &i, &nMaxValue, &nMaxCmdLine, NULL, NULL))!=ERROR_SUCCESS) { @@ -334,7 +336,7 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete, res=ERROR_SUCCESS; goto end; } - + if ((szCmdLine=malloc(nMaxCmdLine))==NULL) { printf("Couldn't allocate memory for the commands to be executed\n"); @@ -350,7 +352,7 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete, res=ERROR_NOT_ENOUGH_MEMORY; goto end; } - + while(i>0) { DWORD nValLength=nMaxValue, nDataLength=nMaxCmdLine; @@ -370,7 +372,7 @@ static BOOL ProcessRunKeys(HKEY hkRoot, LPCWSTR szKeyName, BOOL bDelete, { printf("Couldn't delete value - %ld, %ld. Running command anyways.\n", i, res); } - + if (type!=REG_SZ) { printf("Incorrect type of value #%ld (%ld)\n", i, type); @@ -399,6 +401,7 @@ end: return res==ERROR_SUCCESS?TRUE:FALSE; } + /// structure holding startup flags struct op_mask { BOOL w9xonly; /* Perform only operations done on Windows 9x */ BOOL ntonly; /* Perform only operations done on Windows NT */ @@ -408,8 +411,9 @@ struct op_mask { BOOL postlogin; /* Operations done after login */ }; -static const struct op_mask SESSION_START={FALSE, FALSE, TRUE, TRUE, TRUE, TRUE}, - SETUP={FALSE, FALSE, FALSE, TRUE, TRUE, TRUE}; +static const struct op_mask + SESSION_START = {FALSE, FALSE, TRUE, TRUE, TRUE, TRUE}, + SETUP = {FALSE, FALSE, FALSE, TRUE, TRUE, TRUE}; #define DEFAULT SESSION_START int startup(int argc, char *argv[]) @@ -420,7 +424,7 @@ int startup(int argc, char *argv[]) DWORD res; res = GetWindowsDirectory(gen_path, sizeof(gen_path)); - + if (res==0) { printf("Couldn't get the windows directory - error %ld\n", diff --git a/reactos/subsys/system/explorer/shell/winfs.h b/reactos/subsys/system/explorer/shell/winfs.h index c5a7d1dd6aa..61e6681440d 100644 --- a/reactos/subsys/system/explorer/shell/winfs.h +++ b/reactos/subsys/system/explorer/shell/winfs.h @@ -26,6 +26,7 @@ // + /// Windows File System file-entry struct WinEntry : public Entry { WinEntry(Entry* parent) : Entry(parent) {} @@ -36,6 +37,8 @@ protected: virtual void get_path(PTSTR path) const; }; + + /// Windows File System directory-entry struct WinDirectory : public WinEntry, public Directory { WinDirectory(LPCTSTR root_path) diff --git a/reactos/subsys/system/explorer/taskbar/startmenu.h b/reactos/subsys/system/explorer/taskbar/startmenu.h index dd4e9db860f..4e998cf66c4 100644 --- a/reactos/subsys/system/explorer/taskbar/startmenu.h +++ b/reactos/subsys/system/explorer/taskbar/startmenu.h @@ -42,6 +42,7 @@ #define PM_STARTENTRY_LAUNCHED (WM_APP+0x13) + /// StartMenuDirectory is used to store the base directory of start menus. struct StartMenuDirectory { StartMenuDirectory(const ShellDirectory& dir, bool subfolders=true) @@ -61,6 +62,7 @@ struct StartMenuDirectory typedef list StartMenuShellDirs; typedef set ShellEntrySet; + /// structure holding information about one start menu entry struct StartMenuEntry { StartMenuEntry() : _hIcon(0) {} @@ -72,7 +74,7 @@ struct StartMenuEntry /** - StartMenuButton draws to face of a StartMenuCtrl button control. + StartMenuButton draws the face of a StartMenuCtrl button control. */ struct StartMenuButton : public OwnerdrawnButton { @@ -108,6 +110,7 @@ struct StartMenuCtrl : public Button }; + /// separator between start menu entries struct StartMenuSeparator : public Static { StartMenuSeparator(HWND parent, int x, int y, int w, DWORD style=WS_VISIBLE|WS_CHILD|WS_DISABLED|SS_ETCHEDHORZ, DWORD exStyle=0) @@ -119,6 +122,7 @@ struct StartMenuSeparator : public Static typedef list StartMenuFolders; + /// structor containing information for creating start menus struct StartMenuCreateInfo { StartMenuCreateInfo() : _border_top(0) {} @@ -136,7 +140,8 @@ typedef map ShellEntryMap; /** - Startmenu window + Startmenu window. + To create a start menu call its Create() function. */ struct StartMenu : public OwnerDrawParent { @@ -207,10 +212,10 @@ typedef void (WINAPI* RUNFILEDLG)(HWND hwndOwner, HICON hIcon, LPCSTR lpstrDirec // Flags for RunFileDlg // -#define RFF_NOBROWSE 0x01 // Removes the browse button. -#define RFF_NODEFAULT 0x02 // No default item selected. +#define RFF_NOBROWSE 0x01 // Removes the browse button. +#define RFF_NODEFAULT 0x02 // No default item selected. #define RFF_CALCDIRECTORY 0x04 // Calculates the working directory from the file name. -#define RFF_NOLABEL 0x08 // Removes the edit box label. +#define RFF_NOLABEL 0x08 // Removes the edit box label. #define RFF_NOSEPARATEMEM 0x20 // Removes the Separate Memory Space check box (Windows NT only). @@ -221,7 +226,7 @@ typedef BOOL (WINAPI* SHFINDFILES)(LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSav typedef BOOL (WINAPI* SHFINDCOMPUTER)(LPCITEMIDLIST pidlRoot, LPCITEMIDLIST pidlSavedSearch); - // Startmenu root window + /// Startmenu root window struct StartMenuRoot : public StartMenu { typedef StartMenu super; @@ -248,7 +253,7 @@ protected: }; - // Settings sub-startmenu + /// Settings sub-startmenu struct SettingsMenu : public StartMenu { typedef StartMenu super; @@ -266,7 +271,7 @@ protected: }; - // "Browse Files..." sub-start menu + /// "Browse Files..." sub-start menu struct BrowseMenu : public StartMenu { typedef StartMenu super; @@ -284,6 +289,7 @@ protected: }; + /// "Recent Files" sub-start menu struct RecentStartMenu : public StartMenu { typedef StartMenu super; diff --git a/reactos/subsys/system/explorer/utility/dragdropimpl.cpp b/reactos/subsys/system/explorer/utility/dragdropimpl.cpp index 683bd9b408f..e5bee61c5ec 100644 --- a/reactos/subsys/system/explorer/utility/dragdropimpl.cpp +++ b/reactos/subsys/system/explorer/utility/dragdropimpl.cpp @@ -61,10 +61,10 @@ STDMETHODIMP_(ULONG) IDataObjectImpl::Release() return nTemp; } -STDMETHODIMP IDataObjectImpl::GetData( +STDMETHODIMP IDataObjectImpl::GetData( /* [unique][in] */ FORMATETC __RPC_FAR *pformatetcIn, /* [out] */ STGMEDIUM __RPC_FAR *pmedium) -{ +{ if (pformatetcIn == NULL || pmedium == NULL) return E_INVALIDARG; @@ -84,16 +84,16 @@ STDMETHODIMP IDataObjectImpl::GetData( return DV_E_FORMATETC; } -STDMETHODIMP IDataObjectImpl::GetDataHere( +STDMETHODIMP IDataObjectImpl::GetDataHere( /* [unique][in] */ FORMATETC __RPC_FAR *pformatetc, /* [out][in] */ STGMEDIUM __RPC_FAR *pmedium) -{ +{ return E_NOTIMPL; } -STDMETHODIMP IDataObjectImpl::QueryGetData( +STDMETHODIMP IDataObjectImpl::QueryGetData( /* [unique][in] */ FORMATETC __RPC_FAR *pformatetc) -{ +{ if (pformatetc == NULL) return E_INVALIDARG; @@ -118,21 +118,21 @@ STDMETHODIMP IDataObjectImpl::QueryGetData( return hr; } -STDMETHODIMP IDataObjectImpl::GetCanonicalFormatEtc( +STDMETHODIMP IDataObjectImpl::GetCanonicalFormatEtc( /* [unique][in] */ FORMATETC __RPC_FAR *pformatectIn, /* [out] */ FORMATETC __RPC_FAR *pformatetcOut) -{ +{ if (pformatetcOut == NULL) return E_INVALIDARG; return DATA_S_SAMEFORMATETC; } -STDMETHODIMP IDataObjectImpl::SetData( +STDMETHODIMP IDataObjectImpl::SetData( /* [unique][in] */ FORMATETC __RPC_FAR *pformatetc, /* [unique][in] */ STGMEDIUM __RPC_FAR *pmedium, /* [in] */ BOOL fRelease) -{ +{ if (pformatetc == NULL || pmedium == NULL) return E_INVALIDARG; @@ -201,7 +201,7 @@ void IDataObjectImpl::CopyMedium(STGMEDIUM* pMedDest, STGMEDIUM* pMedSrc, FORMAT STDMETHODIMP IDataObjectImpl::EnumFormatEtc( /* [in] */ DWORD dwDirection, /* [out] */ IEnumFORMATETC __RPC_FAR *__RPC_FAR *ppenumFormatEtc) -{ +{ if (ppenumFormatEtc == NULL) return E_POINTER; @@ -214,9 +214,9 @@ STDMETHODIMP IDataObjectImpl::EnumFormatEtc( if (!*ppenumFormatEtc) return E_OUTOFMEMORY; - (*ppenumFormatEtc)->AddRef(); + (*ppenumFormatEtc)->AddRef(); break; - + case DATADIR_SET: default: return E_NOTIMPL; @@ -226,22 +226,22 @@ STDMETHODIMP IDataObjectImpl::EnumFormatEtc( return S_OK; } -STDMETHODIMP IDataObjectImpl::DAdvise( +STDMETHODIMP IDataObjectImpl::DAdvise( /* [in] */ FORMATETC __RPC_FAR *pformatetc, /* [in] */ DWORD advf, /* [unique][in] */ IAdviseSink __RPC_FAR *pAdvSink, /* [out] */ DWORD __RPC_FAR *pdwConnection) -{ +{ return OLE_E_ADVISENOTSUPPORTED; } -STDMETHODIMP IDataObjectImpl::DUnadvise( +STDMETHODIMP IDataObjectImpl::DUnadvise( /* [in] */ DWORD dwConnection) { return E_NOTIMPL; } -HRESULT STDMETHODCALLTYPE IDataObjectImpl::EnumDAdvise( +HRESULT STDMETHODCALLTYPE IDataObjectImpl::EnumDAdvise( /* [out] */ IEnumSTATDATA __RPC_FAR *__RPC_FAR *ppenumAdvise) { return OLE_E_ADVISENOTSUPPORTED; @@ -283,7 +283,7 @@ STDMETHODIMP_(ULONG) IDropSourceImpl::Release() return nTemp; } -STDMETHODIMP IDropSourceImpl::QueryContinueDrag( +STDMETHODIMP IDropSourceImpl::QueryContinueDrag( /* [in] */ BOOL fEscapePressed, /* [in] */ DWORD grfKeyState) { @@ -353,7 +353,7 @@ STDMETHODIMP_(ULONG) EnumFormatEtcImpl::Release(void) if (nTemp == 0) delete this; - return nTemp; + return nTemp; } STDMETHODIMP EnumFormatEtcImpl::Next( ULONG celt,LPFORMATETC lpFormatEtc, ULONG* pceltFetched) @@ -394,12 +394,12 @@ STDMETHODIMP EnumFormatEtcImpl::Reset(void) m_iCur = 0; return S_OK; } - + STDMETHODIMP EnumFormatEtcImpl::Clone(IEnumFORMATETC** ppCloneEnumFormatEtc) { if (ppCloneEnumFormatEtc == NULL) return E_POINTER; - + EnumFormatEtcImpl* newEnum = new EnumFormatEtcImpl(m_pFmtEtc); if (!newEnum) @@ -421,7 +421,7 @@ IDropTargetImpl::IDropTargetImpl(HWND hTargetWnd) m_pDropTargetHelper(NULL), m_pSupportedFrmt(NULL), m_hTargetWnd(hTargetWnd) -{ +{ assert(m_hTargetWnd != NULL); if (FAILED(CoCreateInstance(CLSID_DragDropHelper,NULL,CLSCTX_INPROC_SERVER, @@ -466,8 +466,8 @@ ULONG STDMETHODCALLTYPE IDropTargetImpl::Release() } bool IDropTargetImpl::QueryDrop(DWORD grfKeyState, LPDWORD pdwEffect) -{ - DWORD dwOKEffects = *pdwEffect; +{ + DWORD dwOKEffects = *pdwEffect; if (!m_bAllowDrop) { @@ -481,27 +481,27 @@ bool IDropTargetImpl::QueryDrop(DWORD grfKeyState, LPDWORD pdwEffect) *pdwEffect = (grfKeyState & MK_CONTROL) ? ( (grfKeyState & MK_SHIFT) ? DROPEFFECT_LINK : DROPEFFECT_COPY ): ( (grfKeyState & MK_SHIFT) ? DROPEFFECT_MOVE : DROPEFFECT_NONE ); - if (*pdwEffect == 0) + if (*pdwEffect == 0) { - // No modifier keys used by user while dragging. + // No modifier keys used by user while dragging. if (DROPEFFECT_COPY & dwOKEffects) *pdwEffect = DROPEFFECT_COPY; else if (DROPEFFECT_MOVE & dwOKEffects) - *pdwEffect = DROPEFFECT_MOVE; + *pdwEffect = DROPEFFECT_MOVE; else if (DROPEFFECT_LINK & dwOKEffects) - *pdwEffect = DROPEFFECT_LINK; - else + *pdwEffect = DROPEFFECT_LINK; + else { *pdwEffect = DROPEFFECT_NONE; } - } + } else { // Check if the drag source application allows the drop effect desired by user. // The drag source specifies this in DoDragDrop if (!(*pdwEffect & dwOKEffects)) *pdwEffect = DROPEFFECT_NONE; - } + } return (DROPEFFECT_NONE == *pdwEffect)?false:true; } @@ -540,7 +540,7 @@ HRESULT STDMETHODCALLTYPE IDropTargetImpl::DragEnter( return S_OK; } -HRESULT STDMETHODCALLTYPE IDropTargetImpl::DragOver( +HRESULT STDMETHODCALLTYPE IDropTargetImpl::DragOver( /* [in] */ DWORD grfKeyState, /* [in] */ POINTL pt, /* [out][in] */ DWORD __RPC_FAR *pdwEffect) @@ -563,7 +563,7 @@ HRESULT STDMETHODCALLTYPE IDropTargetImpl::DragLeave() HRESULT STDMETHODCALLTYPE IDropTargetImpl::Drop( /* [unique][in] */ IDataObject __RPC_FAR *pDataObj, - /* [in] */ DWORD grfKeyState, /* [in] */ POINTL pt, + /* [in] */ DWORD grfKeyState, /* [in] */ POINTL pt, /* [out][in] */ DWORD __RPC_FAR *pdwEffect) { if (pDataObj == NULL) diff --git a/reactos/subsys/system/explorer/utility/dragdropimpl.h b/reactos/subsys/system/explorer/utility/dragdropimpl.h index f4d436ab31f..1c212921b8e 100644 --- a/reactos/subsys/system/explorer/utility/dragdropimpl.h +++ b/reactos/subsys/system/explorer/utility/dragdropimpl.h @@ -14,6 +14,7 @@ using std::vector; typedef vector FormatArray; + /// structure containing information for one format of EnumFormatEtcImpl struct DataStorage { FORMATETC* _format; STGMEDIUM* _medium; @@ -59,16 +60,16 @@ public: //IUnknown virtual HRESULT STDMETHODCALLTYPE QueryInterface( /* [in] */ REFIID riid, - /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); virtual ULONG STDMETHODCALLTYPE AddRef(); virtual ULONG STDMETHODCALLTYPE Release(); //IDropSource - virtual HRESULT STDMETHODCALLTYPE QueryContinueDrag( + virtual HRESULT STDMETHODCALLTYPE QueryContinueDrag( /* [in] */ BOOL fEscapePressed, /* [in] */ DWORD grfKeyState); - - virtual HRESULT STDMETHODCALLTYPE GiveFeedback( + + virtual HRESULT STDMETHODCALLTYPE GiveFeedback( /* [in] */ DWORD dwEffect); }; @@ -89,73 +90,73 @@ public: //IUnknown virtual HRESULT STDMETHODCALLTYPE QueryInterface( /* [in] */ REFIID riid, - /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); + /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); virtual ULONG STDMETHODCALLTYPE AddRef(); virtual ULONG STDMETHODCALLTYPE Release(); //IDataObject - virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetData( + virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetData( /* [unique][in] */ FORMATETC __RPC_FAR *pformatetcIn, /* [out] */ STGMEDIUM __RPC_FAR *pmedium); - - virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetDataHere( + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE GetDataHere( /* [unique][in] */ FORMATETC __RPC_FAR *pformatetc, /* [out][in] */ STGMEDIUM __RPC_FAR *pmedium); - - virtual HRESULT STDMETHODCALLTYPE QueryGetData( + + virtual HRESULT STDMETHODCALLTYPE QueryGetData( /* [unique][in] */ FORMATETC __RPC_FAR *pformatetc); - - virtual HRESULT STDMETHODCALLTYPE GetCanonicalFormatEtc( + + virtual HRESULT STDMETHODCALLTYPE GetCanonicalFormatEtc( /* [unique][in] */ FORMATETC __RPC_FAR *pformatectIn, /* [out] */ FORMATETC __RPC_FAR *pformatetcOut); - - virtual /* [local] */ HRESULT STDMETHODCALLTYPE SetData( + + virtual /* [local] */ HRESULT STDMETHODCALLTYPE SetData( /* [unique][in] */ FORMATETC __RPC_FAR *pformatetc, /* [unique][in] */ STGMEDIUM __RPC_FAR *pmedium, /* [in] */ BOOL fRelease); - - virtual HRESULT STDMETHODCALLTYPE EnumFormatEtc( + + virtual HRESULT STDMETHODCALLTYPE EnumFormatEtc( /* [in] */ DWORD dwDirection, /* [out] */ IEnumFORMATETC __RPC_FAR *__RPC_FAR *ppenumFormatEtc); - - virtual HRESULT STDMETHODCALLTYPE DAdvise( + + virtual HRESULT STDMETHODCALLTYPE DAdvise( /* [in] */ FORMATETC __RPC_FAR *pformatetc, /* [in] */ DWORD advf, /* [unique][in] */ IAdviseSink __RPC_FAR *pAdvSink, /* [out] */ DWORD __RPC_FAR *pdwConnection); - - virtual HRESULT STDMETHODCALLTYPE DUnadvise( + + virtual HRESULT STDMETHODCALLTYPE DUnadvise( /* [in] */ DWORD dwConnection); - - virtual HRESULT STDMETHODCALLTYPE EnumDAdvise( + + virtual HRESULT STDMETHODCALLTYPE EnumDAdvise( /* [out] */ IEnumSTATDATA __RPC_FAR *__RPC_FAR *ppenumAdvise); //IAsyncOperation - //virtual HRESULT STDMETHODCALLTYPE SetAsyncMode( + //virtual HRESULT STDMETHODCALLTYPE SetAsyncMode( // /* [in] */ BOOL fDoOpAsync) //{ // return E_NOTIMPL; //} // - //virtual HRESULT STDMETHODCALLTYPE GetAsyncMode( + //virtual HRESULT STDMETHODCALLTYPE GetAsyncMode( // /* [out] */ BOOL __RPC_FAR *pfIsOpAsync) //{ // return E_NOTIMPL; //} // - //virtual HRESULT STDMETHODCALLTYPE StartOperation( + //virtual HRESULT STDMETHODCALLTYPE StartOperation( // /* [optional][unique][in] */ IBindCtx __RPC_FAR *pbcReserved) //{ // return E_NOTIMPL; //} // - //virtual HRESULT STDMETHODCALLTYPE InOperation( + //virtual HRESULT STDMETHODCALLTYPE InOperation( // /* [out] */ BOOL __RPC_FAR *pfInAsyncOp) //{ // return E_NOTIMPL; //} // - //virtual HRESULT STDMETHODCALLTYPE EndOperation( + //virtual HRESULT STDMETHODCALLTYPE EndOperation( // /* [in] */ HRESULT hResult, // /* [unique][in] */ IBindCtx __RPC_FAR *pbcReserved, // /* [in] */ DWORD dwEffects) @@ -182,10 +183,10 @@ public: virtual ~IDropTargetImpl(); void AddSuportedFormat(FORMATETC& ftetc) {m_formatetc.push_back(ftetc);} - //return values: true - release the medium. false - don't release the medium + //return values: true - release the medium. false - don't release the medium virtual bool OnDrop(FORMATETC* pFmtEtc, STGMEDIUM& medium, DWORD *pdwEffect) = 0; - virtual HRESULT STDMETHODCALLTYPE QueryInterface( + virtual HRESULT STDMETHODCALLTYPE QueryInterface( /* [in] */ REFIID riid, /* [iid_is][out] */ void __RPC_FAR *__RPC_FAR *ppvObject); virtual ULONG STDMETHODCALLTYPE AddRef() {return ++m_cRefCount;} @@ -197,11 +198,11 @@ public: /* [in] */ DWORD grfKeyState, /* [in] */ POINTL pt, /* [out][in] */ DWORD __RPC_FAR *pdwEffect); - virtual HRESULT STDMETHODCALLTYPE DragOver( + virtual HRESULT STDMETHODCALLTYPE DragOver( /* [in] */ DWORD grfKeyState, /* [in] */ POINTL pt, /* [out][in] */ DWORD __RPC_FAR *pdwEffect); - virtual HRESULT STDMETHODCALLTYPE DragLeave(); + virtual HRESULT STDMETHODCALLTYPE DragLeave(); virtual HRESULT STDMETHODCALLTYPE Drop( /* [unique][in] */ IDataObject __RPC_FAR *pDataObj, /* [in] */ DWORD grfKeyState, @@ -209,6 +210,7 @@ public: /* [out][in] */ DWORD __RPC_FAR *pdwEffect); }; + /// implementation of IDragSourceHelper interface class DragSourceHelper { IDragSourceHelper* pDragSourceHelper; @@ -226,15 +228,15 @@ public: virtual ~DragSourceHelper() { - if ( pDragSourceHelper!= NULL ) + if (pDragSourceHelper != NULL) { pDragSourceHelper->Release(); pDragSourceHelper=NULL; } } - + // IDragSourceHelper - HRESULT InitializeFromBitmap(HBITMAP hBitmap, + HRESULT InitializeFromBitmap(HBITMAP hBitmap, POINT& pt, // cursor position in client coords of the window RECT& rc, // selected item's bounding rect IDataObject* pDataObject, @@ -250,7 +252,7 @@ public: di.sizeDragImage.cx = bm.bmWidth; di.sizeDragImage.cy = bm.bmHeight; di.hbmpDragImage = hBitmap; - di.crColorKey = crColorKey; + di.crColorKey = crColorKey; di.ptOffset.x = pt.x - rc.left; di.ptOffset.y = pt.y - rc.top; return pDragSourceHelper->InitializeFromBitmap(&di, pDataObject); diff --git a/reactos/subsys/system/explorer/utility/shellbrowserimpl.h b/reactos/subsys/system/explorer/utility/shellbrowserimpl.h index 8626264fad3..e1404319fb1 100644 --- a/reactos/subsys/system/explorer/utility/shellbrowserimpl.h +++ b/reactos/subsys/system/explorer/utility/shellbrowserimpl.h @@ -28,6 +28,7 @@ // + /// Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellBrowserChild) struct IShellBrowserImpl : public IShellBrowser, public ICommDlgBrowser { IShellBrowserImpl() diff --git a/reactos/subsys/system/explorer/utility/shellclasses.h b/reactos/subsys/system/explorer/utility/shellclasses.h index 1a3f7ccf13b..575dbc35b4d 100644 --- a/reactos/subsys/system/explorer/utility/shellclasses.h +++ b/reactos/subsys/system/explorer/utility/shellclasses.h @@ -175,7 +175,7 @@ struct CommonShellMalloc }; - // wrapper class for IMalloc with usage of common allocator + /// wrapper class for IMalloc with usage of common allocator struct ShellMalloc { @@ -194,7 +194,7 @@ struct ShellMalloc }; - // wrapper template class for pointers to shell objects managed by IMalloc + /// wrapper template class for pointers to shell objects managed by IMalloc template struct SShellPtr { @@ -255,7 +255,7 @@ private: }; - // wrapper class for COM interface pointers + /// wrapper class for COM interface pointers template struct SIfacePtr { @@ -473,7 +473,7 @@ extern "C" UINT ILGetSize(LPCITEMIDLIST pidl); #endif - // wrapper class for item ID lists + /// wrapper class for item ID lists struct ShellPath : public SShellPtr { @@ -673,6 +673,7 @@ struct ShellPath : public SShellPtr extern LPSTR strcpyn(LPSTR dest, LPCSTR source, size_t count); extern LPWSTR wcscpyn(LPWSTR dest, LPCWSTR source, size_t count); + /// easy retrieval of multi byte strings out of STRRET structures struct StrRetA : public STRRET { ~StrRetA() @@ -698,6 +699,7 @@ struct StrRetA : public STRRET } }; + /// easy retrieval of wide char strings out of STRRET structures struct StrRetW : public STRRET { ~StrRetW() @@ -724,6 +726,7 @@ struct StrRetW : public STRRET }; + /// Retreival of file system paths of ShellPath objects class FileSysShellPath : public ShellPath { TCHAR _fullpath[MAX_PATH]; @@ -829,6 +832,7 @@ protected: #else // _WIN32_IE<0x400 -> use SHGetSpecialFolderLocation() + /// file system path of special folder struct SpecialFolderFSPath : public FileSysShellPath { SpecialFolderFSPath(int folder, HWND hwnd) @@ -841,7 +845,7 @@ struct SpecialFolderFSPath : public FileSysShellPath #endif - // wrapper class for enumerating shell namespace objects + /// wrapper class for enumerating shell namespace objects struct ShellItemEnumerator : public SIfacePtr { diff --git a/reactos/subsys/system/explorer/utility/treedroptarget.h b/reactos/subsys/system/explorer/utility/treedroptarget.h index 6c729f90973..3a0345a1089 100644 --- a/reactos/subsys/system/explorer/utility/treedroptarget.h +++ b/reactos/subsys/system/explorer/utility/treedroptarget.h @@ -9,6 +9,7 @@ #include "dragdropimpl.h" + /// OLE drop target for tree controls class TreeDropTarget : public IDropTargetImpl { public: diff --git a/reactos/subsys/system/explorer/utility/window.h b/reactos/subsys/system/explorer/utility/window.h index 7f17fea23d4..ccff844229f 100644 --- a/reactos/subsys/system/explorer/utility/window.h +++ b/reactos/subsys/system/explorer/utility/window.h @@ -114,6 +114,7 @@ protected: static CREATORFUNC s_window_creator; + /// structure for managing critical sections as static class information in struct Window struct StaticWindowData { CritSect _map_crit_sect; CritSect _create_crit_sect; @@ -142,6 +143,7 @@ template struct GetWindowHelper #endif + /// dynamic casting of Window pointers template struct TypeCheck { static CLASS* dyn_cast(Window* wnd) @@ -171,6 +173,7 @@ protected: }; + /// template class used in macro WINDOW_CREATOR to the define creater functions for Window objects template struct WindowCreator { static WND_CLASS* window_creator(HWND hwnd) @@ -183,6 +186,7 @@ template struct WindowCreator (Window::CREATORFUNC) WindowCreator::window_creator + /// template class used in macro WINDOW_CREATOR_INFO to the define creater functions for Window objects with additional creation information template struct WindowCreatorInfo { static WND_CLASS* window_creator(HWND hwnd, const void* info) @@ -348,6 +352,7 @@ protected: // Layouting of resizable windows + /// Flags to specify how to move and resize controls when resizing their parent window enum RESIZE_FLAGS { MOVE_LEFT = 0x1, MOVE_RIGHT = 0x2, @@ -363,6 +368,7 @@ enum RESIZE_FLAGS { RESIZE = RESIZE_X | RESIZE_Y }; + /// structure to assign RESIZE_FLAGS to dialogs control struct ResizeEntry { ResizeEntry(UINT id, int flags) @@ -375,6 +381,8 @@ struct ResizeEntry int _flags; }; + + /// Management of controls in resizable dialogs struct ResizeManager : public std::list { typedef std::list super; @@ -403,6 +411,8 @@ protected: SIZE _last_size; }; + + /// Controller base template class for resizable dialogs template struct ResizeController : public BASE { typedef BASE super;