mirror of
https://github.com/reactos/reactos.git
synced 2024-12-26 17:14:41 +00:00
Completed Doxygen documentation of all compounds in Explorer
svn path=/trunk/; revision=6611
This commit is contained in:
parent
8aedeab84e
commit
4961049825
22 changed files with 153 additions and 101 deletions
|
@ -1,3 +1,5 @@
|
|||
Debug
|
||||
Release
|
||||
*.coff
|
||||
*.exe
|
||||
*.d
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -64,6 +64,7 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
/// entry for the list in "find program" dialogs
|
||||
struct FPDEntry
|
||||
{
|
||||
ShellEntry* _shell_entry;
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
<tr>
|
||||
<td><address style="align: right;"><small>
|
||||
ROS Explore Source Code Documentation
|
||||
<br>generated on 02.11.2003 by <a href="http://www.doxygen.org/index.html">
|
||||
<br>generated on 09.11.2003 by <a href="http://www.doxygen.org/index.html">
|
||||
<img src="doxygen.png" alt="doxygen" align="middle" border=0>
|
||||
</small></address>
|
||||
</td>
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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);
|
||||
|
|
|
@ -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();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -44,6 +44,7 @@ enum COLUMN_FLAGS {
|
|||
};
|
||||
|
||||
|
||||
/// Worker for drawing contents of file lists in child pane
|
||||
struct OutputWorker
|
||||
{
|
||||
OutputWorker();
|
||||
|
|
|
@ -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;
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -46,6 +46,7 @@ protected:
|
|||
};
|
||||
|
||||
|
||||
/// shell folder entry
|
||||
struct ShellDirectory : public ShellEntry, public Directory
|
||||
{
|
||||
ShellDirectory(ShellFolder& root_folder, const ShellPath& shell_path, HWND hwnd)
|
||||
|
|
|
@ -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 <windows.h>
|
||||
#include <ctype.h>
|
||||
|
||||
/* 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",
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -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<StartMenuDirectory> StartMenuShellDirs;
|
||||
typedef set<const ShellEntry*> 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<ShellPath> StartMenuFolders;
|
||||
|
||||
/// structor containing information for creating start menus
|
||||
struct StartMenuCreateInfo
|
||||
{
|
||||
StartMenuCreateInfo() : _border_top(0) {}
|
||||
|
@ -136,7 +140,8 @@ typedef map<UINT, StartMenuEntry> ShellEntryMap;
|
|||
|
||||
|
||||
/**
|
||||
Startmenu window
|
||||
Startmenu window.
|
||||
To create a start menu call its Create() function.
|
||||
*/
|
||||
struct StartMenu : public OwnerDrawParent<DialogWindow>
|
||||
{
|
||||
|
@ -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;
|
||||
|
|
|
@ -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)
|
||||
|
|
|
@ -14,6 +14,7 @@ using std::vector;
|
|||
|
||||
typedef vector<FORMATETC> 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);
|
||||
|
|
|
@ -28,6 +28,7 @@
|
|||
//
|
||||
|
||||
|
||||
/// Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellBrowserChild)
|
||||
struct IShellBrowserImpl : public IShellBrowser, public ICommDlgBrowser
|
||||
{
|
||||
IShellBrowserImpl()
|
||||
|
|
|
@ -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<typename T> struct SShellPtr
|
||||
{
|
||||
|
@ -255,7 +255,7 @@ private:
|
|||
};
|
||||
|
||||
|
||||
// wrapper class for COM interface pointers
|
||||
/// wrapper class for COM interface pointers
|
||||
|
||||
template<typename T> 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<ITEMIDLIST>
|
||||
{
|
||||
|
@ -673,6 +673,7 @@ struct ShellPath : public SShellPtr<ITEMIDLIST>
|
|||
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<IEnumIDList>
|
||||
{
|
||||
|
|
|
@ -9,6 +9,7 @@
|
|||
|
||||
#include "dragdropimpl.h"
|
||||
|
||||
/// OLE drop target for tree controls
|
||||
class TreeDropTarget : public IDropTargetImpl
|
||||
{
|
||||
public:
|
||||
|
|
|
@ -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<typename CLASS> struct GetWindowHelper
|
|||
#endif
|
||||
|
||||
|
||||
/// dynamic casting of Window pointers
|
||||
template<typename CLASS> 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<typename WND_CLASS> struct WindowCreator
|
||||
{
|
||||
static WND_CLASS* window_creator(HWND hwnd)
|
||||
|
@ -183,6 +186,7 @@ template<typename WND_CLASS> struct WindowCreator
|
|||
(Window::CREATORFUNC) WindowCreator<WND_CLASS>::window_creator
|
||||
|
||||
|
||||
/// template class used in macro WINDOW_CREATOR_INFO to the define creater functions for Window objects with additional creation information
|
||||
template<typename WND_CLASS, typename INFO_CLASS> 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<ResizeEntry>
|
||||
{
|
||||
typedef std::list<ResizeEntry> super;
|
||||
|
@ -403,6 +411,8 @@ protected:
|
|||
SIZE _last_size;
|
||||
};
|
||||
|
||||
|
||||
/// Controller base template class for resizable dialogs
|
||||
template<typename BASE> struct ResizeController : public BASE
|
||||
{
|
||||
typedef BASE super;
|
||||
|
|
Loading…
Reference in a new issue