mirror of
https://github.com/Xevion/easy7zip.git
synced 2025-12-07 18:06:55 -06:00
23.01
This commit is contained in:
@@ -1,17 +1,22 @@
|
||||
// Windows/Shell.h
|
||||
|
||||
#ifndef __WINDOWS_SHELL_H
|
||||
#define __WINDOWS_SHELL_H
|
||||
#ifndef ZIP7_WINDOWS_SHELL_H
|
||||
#define ZIP7_WINDOWS_SHELL_H
|
||||
|
||||
#include "../Common/Common.h"
|
||||
#include "../Common/MyWindows.h"
|
||||
#if defined(__MINGW32__) || defined(__MINGW64__)
|
||||
#include <shlobj.h>
|
||||
#else
|
||||
#include <ShlObj.h>
|
||||
#endif
|
||||
|
||||
#include "../Common/MyString.h"
|
||||
|
||||
#include "Defs.h"
|
||||
|
||||
namespace NWindows{
|
||||
namespace NShell{
|
||||
namespace NWindows {
|
||||
namespace NShell {
|
||||
|
||||
/////////////////////////
|
||||
// CItemIDList
|
||||
@@ -20,6 +25,7 @@ namespace NShell{
|
||||
class CItemIDList
|
||||
{
|
||||
LPITEMIDLIST m_Object;
|
||||
Z7_CLASS_NO_COPY(CItemIDList)
|
||||
public:
|
||||
CItemIDList(): m_Object(NULL) {}
|
||||
// CItemIDList(LPCITEMIDLIST itemIDList);
|
||||
@@ -49,6 +55,7 @@ public:
|
||||
/////////////////////////////
|
||||
// CDrop
|
||||
|
||||
/*
|
||||
class CDrop
|
||||
{
|
||||
HDROP m_Object;
|
||||
@@ -63,22 +70,51 @@ public:
|
||||
operator HDROP() { return m_Object;}
|
||||
bool QueryPoint(LPPOINT point)
|
||||
{ return BOOLToBool(::DragQueryPoint(m_Object, point)); }
|
||||
void Finish() { ::DragFinish(m_Object); }
|
||||
UINT QueryFile(UINT fileIndex, LPTSTR fileName, UINT fileNameSize)
|
||||
{ return ::DragQueryFile(m_Object, fileIndex, fileName, fileNameSize); }
|
||||
void Finish()
|
||||
{
|
||||
::DragFinish(m_Object);
|
||||
}
|
||||
UINT QueryFile(UINT fileIndex, LPTSTR fileName, UINT bufSize)
|
||||
{ return ::DragQueryFile(m_Object, fileIndex, fileName, bufSize); }
|
||||
#ifndef _UNICODE
|
||||
UINT QueryFile(UINT fileIndex, LPWSTR fileName, UINT fileNameSize)
|
||||
{ return ::DragQueryFileW(m_Object, fileIndex, fileName, fileNameSize); }
|
||||
UINT QueryFile(UINT fileIndex, LPWSTR fileName, UINT bufSize)
|
||||
{ return ::DragQueryFileW(m_Object, fileIndex, fileName, bufSize); }
|
||||
#endif
|
||||
UINT QueryCountOfFiles();
|
||||
UString QueryFileName(UINT fileIndex);
|
||||
void QueryFileName(UINT fileIndex, UString &fileName);
|
||||
void QueryFileNames(UStringVector &fileNames);
|
||||
};
|
||||
|
||||
*/
|
||||
#endif
|
||||
|
||||
/////////////////////////////
|
||||
// Functions
|
||||
struct CFileAttribs
|
||||
{
|
||||
int FirstDirIndex;
|
||||
// DWORD Sum;
|
||||
// DWORD Product;
|
||||
// CRecordVector<DWORD> Vals;
|
||||
// CRecordVector<bool> IsDirVector;
|
||||
|
||||
CFileAttribs()
|
||||
{
|
||||
Clear();
|
||||
}
|
||||
|
||||
void Clear()
|
||||
{
|
||||
FirstDirIndex = -1;
|
||||
// Sum = 0;
|
||||
// Product = 0;
|
||||
// IsDirVector.Clear();
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
/* read pathnames from HDROP or SHELLIDLIST.
|
||||
The parser can return E_INVALIDARG, if there is some unexpected data in dataObject */
|
||||
HRESULT DataObject_GetData_HDROP_or_IDLIST_Names(IDataObject *dataObject, UStringVector &names);
|
||||
|
||||
HRESULT DataObject_GetData_FILE_ATTRS(IDataObject *dataObject, CFileAttribs &attribs);
|
||||
|
||||
bool GetPathFromIDList(LPCITEMIDLIST itemIDList, CSysString &path);
|
||||
bool BrowseForFolder(LPBROWSEINFO lpbi, CSysString &resultPath);
|
||||
|
||||
Reference in New Issue
Block a user