Lhaz
lhazole.h
[詳解]
1 /*************************************************************************/
6 #pragma once
7 
8 class EnumFORMATETC : public IEnumFORMATETC {
9 public:
10  EnumFORMATETC(ULONG cur, LPUNKNOWN obj, ULONG formats, LPFORMATETC list);
12  HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID FAR* lplpvObj);
13  ULONG STDMETHODCALLTYPE AddRef();
14  ULONG STDMETHODCALLTYPE Release();
15  HRESULT STDMETHODCALLTYPE Next(ULONG celt, FORMATETC *rgelt, ULONG *pceltFetched);
16  HRESULT STDMETHODCALLTYPE Skip(ULONG celt);
17  HRESULT STDMETHODCALLTYPE Reset();
18  HRESULT STDMETHODCALLTYPE Clone(IEnumFORMATETC **ppenum);
19 
20 private:
21  ULONG m_refCnt;
22  LPUNKNOWN m_pUnknownObj;
24  ULONG m_numFormats;
25  LPFORMATETC m_formatList;
26 
27 };
28 
29 class DataObject : public IDataObject {
30 public:
31  HGLOBAL hGlobal;
32  //
33  DataObject(void);
34  ‾DataObject();
35  HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID FAR *lplpvObj);
36  ULONG STDMETHODCALLTYPE AddRef();
37  ULONG STDMETHODCALLTYPE Release();
38  HRESULT STDMETHODCALLTYPE GetData(FORMATETC *pFormatetc, STGMEDIUM *pmedium);
39  HRESULT STDMETHODCALLTYPE GetDataHere(FORMATETC *pFormatetc, STGMEDIUM *pmedium);
40  HRESULT STDMETHODCALLTYPE QueryGetData(FORMATETC *pFormatetc);
41  HRESULT STDMETHODCALLTYPE GetCanonicalFormatEtc(FORMATETC *pFormatetcIn, FORMATETC *pFormatetcOut);
42  HRESULT STDMETHODCALLTYPE SetData(FORMATETC *pFormatetc, STGMEDIUM *pmedium, BOOL fRelease);
43  HRESULT STDMETHODCALLTYPE EnumFormatEtc(DWORD dwDirection, IEnumFORMATETC **ppenumFormatetc);
44  HRESULT STDMETHODCALLTYPE DAdvise(FORMATETC *pFormatetc, DWORD advf, IAdviseSink *pAdvSink, DWORD *pdwConnection);
45  HRESULT STDMETHODCALLTYPE DUnadvise(DWORD dwConnection);
46  HRESULT STDMETHODCALLTYPE EnumDAdvise(IEnumSTATDATA **ppenumAdvise);
47 
48 private:
49  ULONG m_refCnt;
50  FORMATETC m_Etc;
51  //
52  HGLOBAL DuplicateGlobalMem(HGLOBAL srcGlobal);
53 
54 };
55 
56 class DropSource : public IDropSource {
57 public:
58  DropSource(LHAZ* lhazp);
59  HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID FAR *lplpvObj);
60  ULONG STDMETHODCALLTYPE AddRef();
61  ULONG STDMETHODCALLTYPE Release();
62  HRESULT STDMETHODCALLTYPE QueryContinueDrag(BOOL fEscapePressed, DWORD grfKeyState);
63  HRESULT STDMETHODCALLTYPE GiveFeedback(DWORD dwEffect);
64 
65 protected:
67 
68 private:
69  DWORD m_Effect;
70  ULONG m_refCnt;
71  //
72  virtual void ExtractTmp(void);
73 
74 };
75 
76 class DropSource_GD : public DropSource {
77 public:
78  DropSource_GD(LHAZ* lhazp);
79 
80 private:
81  void ExtractTmp(void);
82 
83 };
84 
85 class DropSource_OD : public DropSource {
86 public:
87  DropSource_OD(LHAZ* lhazp);
88 
89 private:
90  void ExtractTmp(void);
91 
92 };
93 
94 class DropSource_DB : public DropSource {
95 public:
96  DropSource_DB(LHAZ* lhazp);
97 
98 private:
99  void ExtractTmp(void);
100 
101 };
Definition: lhazole.h:85
HRESULT STDMETHODCALLTYPE Skip(ULONG celt)
Skip.
Definition: lhazole.cpp:138
HGLOBAL hGlobal
Definition: lhazole.h:31
‾EnumFORMATETC()
Destructor.
Definition: lhazole.cpp:42
Definition: lhazole.h:8
ULONG m_refCnt
Definition: lhazole.h:49
Definition: lhazole.h:76
HRESULT STDMETHODCALLTYPE QueryInterface(REFIID riid, LPVOID FAR *lplpvObj)
QueryInterface.
Definition: lhazole.cpp:101
FORMATETC m_Etc
Definition: lhazole.h:50
LPFORMATETC m_formatList
Definition: lhazole.h:25
ULONG m_currElement
Definition: lhazole.h:23
ULONG m_refCnt
Definition: lhazole.h:70
LHAZ * m_lhazp
Definition: lhazole.h:66
Definition: lhazole.h:29
Definition: lhazole.h:94
EnumFORMATETC(ULONG cur, LPUNKNOWN obj, ULONG formats, LPFORMATETC list)
Constructor.
Definition: lhazole.cpp:26
ULONG STDMETHODCALLTYPE AddRef()
AddRef.
Definition: lhazole.cpp:51
DWORD m_Effect
Definition: lhazole.h:69
HRESULT STDMETHODCALLTYPE Next(ULONG celt, FORMATETC *rgelt, ULONG *pceltFetched)
Next.
Definition: lhazole.cpp:74
LPUNKNOWN m_pUnknownObj
Definition: lhazole.h:22
ULONG m_numFormats
Definition: lhazole.h:24
HRESULT STDMETHODCALLTYPE Reset()
Reset.
Definition: lhazole.cpp:129
Main Class.
Definition: lhaz.h:47
ULONG m_refCnt
Definition: lhazole.h:21
ULONG STDMETHODCALLTYPE Release()
Release.
Definition: lhazole.cpp:115
HRESULT STDMETHODCALLTYPE Clone(IEnumFORMATETC **ppenum)
Clone.
Definition: lhazole.cpp:61
Definition: lhazole.h:56