ReactOS  0.4.14-dev-838-g99f979d
CAddressEditBox Class Reference

#include <addresseditbox.h>

Inheritance diagram for CAddressEditBox:
Collaboration diagram for CAddressEditBox:

Public Member Functions

 CAddressEditBox ()
 
 ~CAddressEditBox ()
 
virtual HRESULT STDMETHODCALLTYPE SetOwner (IUnknown *)
 
virtual HRESULT STDMETHODCALLTYPE FileSysChange (long param8, long paramC)
 
virtual HRESULT STDMETHODCALLTYPE Refresh (long param8)
 
virtual HRESULT STDMETHODCALLTYPE Init (HWND comboboxEx, HWND editControl, long param14, IUnknown *param18)
 
virtual HRESULT STDMETHODCALLTYPE SetCurrentDir (long paramC)
 
virtual HRESULT STDMETHODCALLTYPE ParseNow (long paramC)
 
virtual HRESULT STDMETHODCALLTYPE Execute (long paramC)
 
virtual HRESULT STDMETHODCALLTYPE Save (long paramC)
 
virtual HRESULT STDMETHODCALLTYPE OnWinEvent (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
 
virtual HRESULT STDMETHODCALLTYPE IsWindowOwner (HWND hWnd)
 
virtual HRESULT STDMETHODCALLTYPE QueryStatus (const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
 
virtual HRESULT STDMETHODCALLTYPE Exec (const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
 
virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount (UINT *pctinfo)
 
virtual HRESULT STDMETHODCALLTYPE GetTypeInfo (UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
 
virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames (REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
 
virtual HRESULT STDMETHODCALLTYPE Invoke (DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
 
virtual HRESULT STDMETHODCALLTYPE GetClassID (CLSID *pClassID)
 
virtual HRESULT STDMETHODCALLTYPE IsDirty ()
 
virtual HRESULT STDMETHODCALLTYPE Load (IStream *pStm)
 
virtual HRESULT STDMETHODCALLTYPE Save (IStream *pStm, BOOL fClearDirty)
 
virtual HRESULT STDMETHODCALLTYPE GetSizeMax (ULARGE_INTEGER *pcbSize)
 
- Public Member Functions inherited from ATL::CComObjectRootEx< CComMultiThreadModelNoCS >
 ~CComObjectRootEx ()
 
ULONG InternalAddRef ()
 
ULONG InternalRelease ()
 
void Lock ()
 
void Unlock ()
 
HRESULT _AtlInitialConstruct ()
 
- Public Member Functions inherited from ATL::CComObjectRootBase
 CComObjectRootBase ()
 
 ~CComObjectRootBase ()
 
void SetVoid (void *)
 
HRESULT _AtlFinalConstruct ()
 
HRESULT FinalConstruct ()
 
void InternalFinalConstructAddRef ()
 
void InternalFinalConstructRelease ()
 
void FinalRelease ()
 
- Public Member Functions inherited from IDispatch
HRESULT RemoteInvoke ([in] DISPID dispIdMember, [in] REFIID riid, [in] LCID lcid, [in] DWORD dwFlags, [in] DISPPARAMS *pDispParams, [out] VARIANT *pVarResult, [out] EXCEPINFO *pExcepInfo, [out] UINT *pArgErr, [in] UINT cVarRef, [in, size_is(cVarRef)] UINT *rgVarRefIdx, [in, out, size_is(cVarRef)] VARIANTARG *rgVarRef)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 

Private Member Functions

void PopulateComboBox (LPITEMIDLIST pidl)
 
void AddComboBoxItem (LPITEMIDLIST pidl, int index, int indent)
 
void FillOneLevel (int index, int levelIndent, int indent)
 
LPITEMIDLIST GetItemData (int index)
 

Private Attributes

CContainedWindow fCombobox
 
CContainedWindow fEditWindow
 
DWORD fAdviseCookie
 
CComPtr< IUnknownfSite
 
LPITEMIDLIST pidlLastParsed
 
HWND hComboBoxEx
 

Additional Inherited Members

- Public Types inherited from IDispatch
typedef IDispatchLPDISPATCH
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IOleCommandTarget
enum  OLECMDF {
  OLECMDF_SUPPORTED = 0x1, OLECMDF_ENABLED = 0x2, OLECMDF_LATCHED = 0x4, OLECMDF_NINCHED = 0x8,
  OLECMDF_INVISIBLE = 0x10, OLECMDF_DEFHIDEONCTXTMENU = 0x20
}
 
enum  OLECMDTEXTF { OLECMDTEXTF_NONE = 0, OLECMDTEXTF_NAME = 1, OLECMDTEXTF_STATUS = 2 }
 
enum  OLECMDEXECOPT { OLECMDEXECOPT_DODEFAULT = 0, OLECMDEXECOPT_PROMPTUSER = 1, OLECMDEXECOPT_DONTPROMPTUSER = 2, OLECMDEXECOPT_SHOWHELP = 3 }
 
enum  OLECMDID {
  OLECMDID_OPEN = 1, OLECMDID_NEW = 2, OLECMDID_SAVE = 3, OLECMDID_SAVEAS = 4,
  OLECMDID_SAVECOPYAS = 5, OLECMDID_PRINT = 6, OLECMDID_PRINTPREVIEW = 7, OLECMDID_PAGESETUP = 8,
  OLECMDID_SPELL = 9, OLECMDID_PROPERTIES = 10, OLECMDID_CUT = 11, OLECMDID_COPY = 12,
  OLECMDID_PASTE = 13, OLECMDID_PASTESPECIAL = 14, OLECMDID_UNDO = 15, OLECMDID_REDO = 16,
  OLECMDID_SELECTALL = 17, OLECMDID_CLEARSELECTION = 18, OLECMDID_ZOOM = 19, OLECMDID_GETZOOMRANGE = 20,
  OLECMDID_UPDATECOMMANDS = 21, OLECMDID_REFRESH = 22, OLECMDID_STOP = 23, OLECMDID_HIDETOOLBARS = 24,
  OLECMDID_SETPROGRESSMAX = 25, OLECMDID_SETPROGRESSPOS = 26, OLECMDID_SETPROGRESSTEXT = 27, OLECMDID_SETTITLE = 28,
  OLECMDID_SETDOWNLOADSTATE = 29, OLECMDID_STOPDOWNLOAD = 30, OLECMDID_ONTOOLBARACTIVATED = 31, OLECMDID_FIND = 32,
  OLECMDID_DELETE = 33, OLECMDID_HTTPEQUIV = 34, OLECMDID_HTTPEQUIV_DONE = 35, OLECMDID_ENABLE_INTERACTION = 36,
  OLECMDID_ONUNLOAD = 37, OLECMDID_PROPERTYBAG2 = 38, OLECMDID_PREREFRESH = 39, OLECMDID_SHOWSCRIPTERROR = 40,
  OLECMDID_SHOWMESSAGE = 41, OLECMDID_SHOWFIND = 42, OLECMDID_SHOWPAGESETUP = 43, OLECMDID_SHOWPRINT = 44,
  OLECMDID_CLOSE = 45, OLECMDID_ALLOWUILESSSAVEAS = 46, OLECMDID_DONTDOWNLOADCSS = 47, OLECMDID_UPDATEPAGESTATUS = 48,
  OLECMDID_PRINT2 = 49, OLECMDID_PRINTPREVIEW2 = 50, OLECMDID_SETPRINTTEMPLATE = 51, OLECMDID_GETPRINTTEMPLATE = 52,
  OLECMDID_PAGEACTIONBLOCKED = 55, OLECMDID_PAGEACTIONUIQUERY = 56, OLECMDID_FOCUSVIEWCONTROLS = 57, OLECMDID_FOCUSVIEWCONTROLSQUERY = 58,
  OLECMDID_SHOWPAGEACTIONMENU = 59, OLECMDID_ADDTRAVELENTRY = 60, OLECMDID_UPDATETRAVELENTRY = 61, OLECMDID_UPDATEBACKFORWARDSTATE = 62,
  OLECMDID_OPTICAL_ZOOM = 63, OLECMDID_OPTICAL_GETZOOMRANGE = 64, OLECMDID_WINDOWSTATECHANGED = 65, OLECMDID_ACTIVEXINSTALLSCOPE = 66,
  OLECMDID_UPDATETRAVELENTRY_DATARECOVERY = 67, OLECMDID_SHOWTASKDLG = 68, OLECMDID_POPSTATEEVENT = 69, OLECMDID_VIEWPORT_MODE = 70,
  OLECMDID_LAYOUT_VIEWPORT_WIDTH = 71, OLECMDID_VISUAL_VIEWPORT_EXCLUDE_BOTTOM = 72, OLECMDID_USER_OPTICAL_ZOOM = 73, OLECMDID_PAGEAVAILABLE = 74,
  OLECMDID_GETUSERSCALABLE = 75, OLECMDID_UPDATE_CARET = 76, OLECMDID_ENABLE_VISIBILITY = 77, OLECMDID_MEDIA_PLAYBACK = 78
}
 
typedef IOleCommandTargetLPOLECOMMANDTARGET
 
typedef enum IOleCommandTarget::OLECMDF OLECMDF
 
typedef struct IOleCommandTarget::_tagOLECMD OLECMD
 
typedef struct IOleCommandTarget::_tagOLECMDTEXT OLECMDTEXT
 
typedef enum IOleCommandTarget::OLECMDTEXTF OLECMDTEXTF
 
typedef enum IOleCommandTarget::OLECMDEXECOPT OLECMDEXECOPT
 
typedef enum IOleCommandTarget::OLECMDID OLECMDID
 
- Public Types inherited from IPersistStream
typedef IPersistStreamLPPERSISTSTREAM
 
- Public Types inherited from IPersist
typedef IPersistLPPERSIST
 
- Static Public Member Functions inherited from ATL::CComObjectRootBase
static void WINAPI ObjectMain (bool)
 
static const struct _ATL_CATMAP_ENTRYGetCategoryMap ()
 
static HRESULT WINAPI InternalQueryInterface (void *pThis, const _ATL_INTMAP_ENTRY *pEntries, REFIID iid, void **ppvObject)
 
- Public Attributes inherited from ATL::CComObjectRootBase
LONG m_dwRef
 
- Public Attributes inherited from IDispatch
const DISPID DISPID_UNKNOWN = -1
 
const DISPID DISPID_VALUE = 0
 
const DISPID DISPID_PROPERTYPUT = -3
 
const DISPID DISPID_NEWENUM = -4
 
const DISPID DISPID_EVALUATE = -5
 
const DISPID DISPID_CONSTRUCTOR = -6
 
const DISPID DISPID_DESTRUCTOR = -7
 
const DISPID DISPID_COLLECT = -8
 

Detailed Description

Definition at line 23 of file addresseditbox.h.

Constructor & Destructor Documentation

◆ CAddressEditBox()

CAddressEditBox::CAddressEditBox ( )

Definition at line 33 of file addresseditbox.cpp.

33  :
34  fCombobox(NULL, this, 1),
35  fEditWindow(NULL, this, 1),
36  fSite(NULL),
38 {
39 }
CContainedWindow fEditWindow
smooth NULL
Definition: ftsmooth.c:416
CComPtr< IUnknown > fSite
LPITEMIDLIST pidlLastParsed
CContainedWindow fCombobox

◆ ~CAddressEditBox()

CAddressEditBox::~CAddressEditBox ( )

Definition at line 41 of file addresseditbox.cpp.

42 {
43  if (pidlLastParsed)
45 }
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
LPITEMIDLIST pidlLastParsed

Member Function Documentation

◆ AddComboBoxItem()

void CAddressEditBox::AddComboBoxItem ( LPITEMIDLIST  pidl,
int  index,
int  indent 
)
private

Definition at line 503 of file addresseditbox.cpp.

504 {
505  HRESULT hr;
506  WCHAR buf[4096];
507 
508  LPCITEMIDLIST pidlChild;
510  hr = SHBindToParent(pidl, IID_PPV_ARG(IShellFolder, &sf), &pidlChild);
511  if (FAILED_UNEXPECTEDLY(hr))
512  return;
513 
514  STRRET strret;
515  hr = sf->GetDisplayNameOf(pidlChild, SHGDN_FORADDRESSBAR, &strret);
516  if (FAILED_UNEXPECTEDLY(hr))
517  return;
518 
519  hr = StrRetToBufW(&strret, pidlChild, buf, 4095);
520  if (FAILED_UNEXPECTEDLY(hr))
521  return;
522 
523  COMBOBOXEXITEMW item = {0};
525  item.iImage = SHMapPIDLToSystemImageListIndex(sf, pidlChild, &item.iSelectedImage);
526  item.pszText = buf;
527  item.lParam = (LPARAM)(ILClone(pidl));
528  item.iIndent = indent;
529  item.iItem = index;
531 }
static const WCHAR indent[]
Definition: object.c:1156
HRESULT hr
Definition: shlfolder.c:183
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
#define CBEIF_INDENT
Definition: commctrl.h:3786
HRESULT WINAPI StrRetToBufW(LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, UINT len)
Definition: string.c:1522
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define IID_PPV_ARG(Itype, ppType)
#define CBEIF_TEXT
Definition: commctrl.h:3782
LONG_PTR LPARAM
Definition: windef.h:208
#define CBEIF_IMAGE
Definition: commctrl.h:3783
#define CBEIF_LPARAM
Definition: commctrl.h:3787
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define index(s, c)
Definition: various.h:29
static ATOM item
Definition: dde.c:856
#define CBEM_INSERTITEMW
Definition: commctrl.h:3837
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
Definition: pidl.c:1323
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPI SHMapPIDLToSystemImageListIndex(IShellFolder *sh, LPCITEMIDLIST pidl, int *pIndex)
Definition: iconcache.cpp:789
#define CBEIF_SELECTEDIMAGE
Definition: commctrl.h:3784

Referenced by FillOneLevel(), and PopulateComboBox().

◆ Exec()

HRESULT STDMETHODCALLTYPE CAddressEditBox::Exec ( const GUID pguidCmdGroup,
DWORD  nCmdID,
DWORD  nCmdexecopt,
VARIANT pvaIn,
VARIANT pvaOut 
)
virtual

Implements IOleCommandTarget.

Definition at line 319 of file addresseditbox.cpp.

321 {
322  return E_NOTIMPL;
323 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Execute()

HRESULT STDMETHODCALLTYPE CAddressEditBox::Execute ( long  paramC)
virtual

Definition at line 176 of file addresseditbox.cpp.

177 {
178  HRESULT hr;
179 
180  /*
181  * Parse the path is it wasn't parsed
182  */
183  if (!pidlLastParsed)
184  ParseNow(0);
185 
186  if (!pidlLastParsed)
187  return E_FAIL;
188 
189  /*
190  * Get the IShellBrowser and IBrowserService interfaces of the shell browser
191  */
194  if (FAILED(hr))
195  return hr;
196 
198  pisb->QueryInterface(IID_PPV_ARG(IBrowserService, &pbs));
199  if (FAILED(hr))
200  return hr;
201 
202  /*
203  * Get the current pidl of the shellbrowser and check if it is the same with the parsed one
204  */
205  PIDLIST_ABSOLUTE pidl;
206  hr = pbs->GetPidl(&pidl);
207  if (FAILED(hr))
208  return hr;
209 
211  hr = SHGetDesktopFolder(&psf);
212  if (FAILED(hr))
213  return hr;
214 
215  hr = psf->CompareIDs(0, pidl, pidlLastParsed);
216 
217  SHFree(pidl);
218  if (hr == 0)
219  return S_OK;
220 
221  /*
222  * Attempt to browse to the parsed pidl
223  */
224  hr = pisb->BrowseObject(pidlLastParsed, 0);
225  if (SUCCEEDED(hr))
226  return hr;
227 
228  /*
229  * Browsing to the pidl failed so it's not a folder. So invoke its defaule command.
230  */
231  HWND topLevelWindow;
232  hr = IUnknown_GetWindow(pisb, &topLevelWindow);
233  if (FAILED(hr))
234  return hr;
235 
236  LPCITEMIDLIST pidlChild;
239  if (FAILED(hr))
240  return hr;
241 
242  hr = SHInvokeDefaultCommand(topLevelWindow, sf, pidlChild);
243  if (FAILED(hr))
244  return hr;
245 
246  return hr;
247 }
HRESULT hr
Definition: shlfolder.c:183
HRESULT WINAPI SHInvokeDefaultCommand(HWND hWnd, IShellFolder *lpFolder, LPCITEMIDLIST lpApidl)
Definition: ordinal.c:2928
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
virtual HRESULT STDMETHODCALLTYPE ParseNow(long paramC)
#define IID_PPV_ARG(Itype, ppType)
#define E_FAIL
Definition: ddrawi.h:102
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1283
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1448
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
LONG HRESULT
Definition: typedefs.h:77
CComPtr< IUnknown > fSite
#define S_OK
Definition: intsafe.h:59
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
Definition: pidl.c:1323
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:331
LPITEMIDLIST pidlLastParsed
#define SID_SShellBrowser
Definition: shlguid.h:125
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by OnWinEvent().

◆ FileSysChange()

HRESULT STDMETHODCALLTYPE CAddressEditBox::FileSysChange ( long  param8,
long  paramC 
)
virtual

Definition at line 61 of file addresseditbox.cpp.

62 {
63  return E_NOTIMPL;
64 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ FillOneLevel()

void CAddressEditBox::FillOneLevel ( int  index,
int  levelIndent,
int  indent 
)
private

Definition at line 533 of file addresseditbox.cpp.

534 {
535  HRESULT hr;
536  ULONG numObj;
537  int count;
538  LPITEMIDLIST pidl, pidl2, pidl3, pidl4;
539 
540  count = index + 1;
541  pidl = GetItemData(index);
542  pidl2 = GetItemData(count);
543  if(pidl)
544  {
545  CComPtr<IShellFolder> psfDesktop;
546  CComPtr<IShellFolder> psfItem;
547 
548  hr = SHGetDesktopFolder(&psfDesktop);
549  if (FAILED_UNEXPECTEDLY(hr))
550  return;
551 
552  if (!pidl->mkid.cb)
553  {
554  psfItem = psfDesktop;
555  }
556  else
557  {
558  hr = psfDesktop->BindToObject(pidl, NULL, IID_PPV_ARG(IShellFolder, &psfItem));
559  if (FAILED_UNEXPECTEDLY(hr))
560  return;
561  }
562 
563  CComPtr<IEnumIDList> pEnumIDList;
564  hr = psfItem->EnumObjects(0, SHCONTF_FOLDERS | SHCONTF_INCLUDEHIDDEN, &pEnumIDList);
565  if (FAILED_UNEXPECTEDLY(hr))
566  return;
567 
568  do
569  {
570  hr = pEnumIDList->Next(1, &pidl3, &numObj);
571  if(hr != S_OK || !numObj)
572  break;
573 
574  pidl4 = ILCombine(pidl, pidl3);
575  if (pidl2 && ILIsEqual(pidl4, pidl2))
576  count += (indent - levelIndent);
577  else
578  AddComboBoxItem(pidl4, count, levelIndent);
579  count++;
580  ILFree(pidl3);
581  ILFree(pidl4);
582  } while (true);
583  }
584 }
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
static const WCHAR indent[]
Definition: object.c:1156
HRESULT hr
Definition: shlfolder.c:183
LPITEMIDLIST GetItemData(int index)
GLuint GLuint GLsizei count
Definition: gl.h:1545
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:699
BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:535
#define IID_PPV_ARG(Itype, ppType)
smooth NULL
Definition: ftsmooth.c:416
GLuint index
Definition: glext.h:6031
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
void AddComboBoxItem(LPITEMIDLIST pidl, int index, int indent)
#define S_OK
Definition: intsafe.h:59
unsigned int ULONG
Definition: retypes.h:1
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41

Referenced by PopulateComboBox().

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CAddressEditBox::GetClassID ( CLSID pClassID)
virtual

Implements IPersist.

Definition at line 422 of file addresseditbox.cpp.

423 {
424  if (pClassID == NULL)
425  return E_POINTER;
426  *pClassID = CLSID_AddressEditBox;
427  return S_OK;
428 }
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ GetIDsOfNames()

HRESULT STDMETHODCALLTYPE CAddressEditBox::GetIDsOfNames ( REFIID  riid,
LPOLESTR rgszNames,
UINT  cNames,
LCID  lcid,
DISPID rgDispId 
)
virtual

Implements IDispatch.

Definition at line 335 of file addresseditbox.cpp.

337 {
338  return E_NOTIMPL;
339 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetItemData()

LPITEMIDLIST CAddressEditBox::GetItemData ( int  index)
private

Definition at line 586 of file addresseditbox.cpp.

587 {
589 
590  memset(&item, 0, sizeof(COMBOBOXEXITEMW));
591  item.mask = CBEIF_LPARAM;
592  item.iItem = index;
594  return (LPITEMIDLIST)item.lParam;
595 }
#define CBEM_GETITEMW
Definition: commctrl.h:3839
LONG_PTR LPARAM
Definition: windef.h:208
#define CBEIF_LPARAM
Definition: commctrl.h:3787
#define index(s, c)
Definition: various.h:29
static ATOM item
Definition: dde.c:856
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define memset(x, y, z)
Definition: compat.h:39
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41

Referenced by FillOneLevel(), and PopulateComboBox().

◆ GetSizeMax()

HRESULT STDMETHODCALLTYPE CAddressEditBox::GetSizeMax ( ULARGE_INTEGER pcbSize)
virtual

Implements IPersistStream.

Definition at line 445 of file addresseditbox.cpp.

446 {
447  return E_NOTIMPL;
448 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetTypeInfo()

HRESULT STDMETHODCALLTYPE CAddressEditBox::GetTypeInfo ( UINT  iTInfo,
LCID  lcid,
ITypeInfo **  ppTInfo 
)
virtual

Implements IDispatch.

Definition at line 330 of file addresseditbox.cpp.

331 {
332  return E_NOTIMPL;
333 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetTypeInfoCount()

HRESULT STDMETHODCALLTYPE CAddressEditBox::GetTypeInfoCount ( UINT pctinfo)
virtual

Implements IDispatch.

Definition at line 325 of file addresseditbox.cpp.

326 {
327  return E_NOTIMPL;
328 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Init()

HRESULT STDMETHODCALLTYPE CAddressEditBox::Init ( HWND  comboboxEx,
HWND  editControl,
long  param14,
IUnknown param18 
)
virtual

Definition at line 71 of file addresseditbox.cpp.

72 {
73  CComPtr<IBrowserService> browserService;
74 
75  fCombobox.SubclassWindow(comboboxEx);
76  fEditWindow.SubclassWindow(editControl);
77  fSite = param18;
78  hComboBoxEx = comboboxEx;
79 
81 
82  // take advice to watch events
83  HRESULT hResult = IUnknown_QueryService(param18, SID_SShellBrowser, IID_PPV_ARG(IBrowserService, &browserService));
84  if (SUCCEEDED(hResult))
85  {
86  hResult = AtlAdvise(browserService, static_cast<IDispatch *>(this), DIID_DWebBrowserEvents, &fAdviseCookie);
87  }
88 
89  return hResult;
90 }
#define SHACF_URLALL
Definition: shlwapi.h:1915
HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, DWORD *pdw)
Definition: atl.c:45
CContainedWindow fEditWindow
#define IID_PPV_ARG(Itype, ppType)
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1448
#define SHACF_FILESYSTEM
Definition: shlwapi.h:1912
LONG HRESULT
Definition: typedefs.h:77
BOOL SubclassWindow(HWND hWnd)
Definition: atlwin.h:1688
CComPtr< IUnknown > fSite
#define SHACF_USETAB
Definition: shlwapi.h:1916
HRESULT WINAPI SHAutoComplete(HWND hwndEdit, DWORD dwFlags)
Definition: url.c:2530
CContainedWindow fCombobox
#define SID_SShellBrowser
Definition: shlguid.h:125
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ Invoke()

HRESULT STDMETHODCALLTYPE CAddressEditBox::Invoke ( DISPID  dispIdMember,
REFIID  riid,
LCID  lcid,
WORD  wFlags,
DISPPARAMS *  pDispParams,
VARIANT pVarResult,
EXCEPINFO *  pExcepInfo,
UINT puArgErr 
)
virtual

Implements IDispatch.

Definition at line 341 of file addresseditbox.cpp.

343 {
346  HRESULT hr;
347  PIDLIST_ABSOLUTE absolutePIDL;
348  LPCITEMIDLIST pidlChild;
349  STRRET ret;
350  WCHAR buf[4096];
351 
352  if (pDispParams == NULL)
353  return E_INVALIDARG;
354 
355  switch (dispIdMember)
356  {
359 
360  if (pidlLastParsed)
363 
364  /* Get the current pidl of the browser */
365  hr = IUnknown_QueryService(fSite, SID_STopLevelBrowser, IID_PPV_ARG(IBrowserService, &isb));
366  if (FAILED_UNEXPECTEDLY(hr))
367  return hr;
368 
369  hr = isb->GetPidl(&absolutePIDL);
370  if (FAILED_UNEXPECTEDLY(hr))
371  return hr;
372 
373  /* Fill the combobox */
374  PopulateComboBox(absolutePIDL);
375 
376  /* Find the current item in the combobox and select it */
377  CComPtr<IShellFolder> psfDesktop;
378  hr = SHGetDesktopFolder(&psfDesktop);
379  if (FAILED_UNEXPECTEDLY(hr))
380  return S_OK;
381 
382  hr = psfDesktop->GetDisplayNameOf(absolutePIDL, SHGDN_FORADDRESSBAR, &ret);
383  if (FAILED_UNEXPECTEDLY(hr))
384  return S_OK;
385 
386  hr = StrRetToBufW(&ret, absolutePIDL, buf, 4095);
387  if (FAILED_UNEXPECTEDLY(hr))
388  return S_OK;
389 
391  if (index != -1)
393 
394  /* Add the item that will be visible when the combobox is not expanded */
395  hr = SHBindToParent(absolutePIDL, IID_PPV_ARG(IShellFolder, &sf), &pidlChild);
396  if (FAILED_UNEXPECTEDLY(hr))
397  return hr;
398 
399  hr = sf->GetDisplayNameOf(pidlChild, SHGDN_FORADDRESSBAR | SHGDN_FORPARSING, &ret);
400  if (FAILED_UNEXPECTEDLY(hr))
401  return hr;
402 
403  hr = StrRetToBufW(&ret, pidlChild, buf, 4095);
404  if (FAILED_UNEXPECTEDLY(hr))
405  return hr;
406 
407  INT indexClosed, indexOpen;
408  indexClosed = SHMapPIDLToSystemImageListIndex(sf, pidlChild, &indexOpen);
409 
410  COMBOBOXEXITEMW item = {0};
412  item.iItem = -1;
413  item.iImage = indexClosed;
414  item.iSelectedImage = indexOpen;
415  item.pszText = buf;
416  item.lParam = reinterpret_cast<LPARAM>(absolutePIDL);
417  fCombobox.SendMessage(CBEM_SETITEM, 0, reinterpret_cast<LPARAM>(&item));
418  }
419  return S_OK;
420 }
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
HRESULT hr
Definition: shlfolder.c:183
GLenum GLuint GLenum GLsizei const GLchar * buf
Definition: glext.h:7751
HRESULT WINAPI StrRetToBufW(LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, UINT len)
Definition: string.c:1522
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define DISPID_DOCUMENTCOMPLETE
Definition: webchild.h:61
#define IID_PPV_ARG(Itype, ppType)
int32_t INT
Definition: typedefs.h:56
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1448
#define CBEIF_TEXT
Definition: commctrl.h:3782
#define E_INVALIDARG
Definition: ddrawi.h:101
#define DISPID_NAVIGATECOMPLETE2
Definition: webchild.h:54
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define CBEIF_IMAGE
Definition: commctrl.h:3783
GLuint index
Definition: glext.h:6031
#define CBEIF_LPARAM
Definition: commctrl.h:3787
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
int ret
#define CB_SETCURSEL
Definition: winuser.h:1943
void PopulateComboBox(LPITEMIDLIST pidl)
CComPtr< IUnknown > fSite
#define S_OK
Definition: intsafe.h:59
static ATOM item
Definition: dde.c:856
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
Definition: pidl.c:1323
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
int WINAPI SHMapPIDLToSystemImageListIndex(IShellFolder *sh, LPCITEMIDLIST pidl, int *pIndex)
Definition: iconcache.cpp:789
#define CBEIF_SELECTEDIMAGE
Definition: commctrl.h:3784
LPITEMIDLIST pidlLastParsed
#define CBEM_SETITEM
Definition: commctrl.h:3842
CContainedWindow fCombobox
#define CB_FINDSTRINGEXACT
Definition: winuser.h:1922

◆ IsDirty()

HRESULT STDMETHODCALLTYPE CAddressEditBox::IsDirty ( void  )
virtual

Implements IPersistStream.

Definition at line 430 of file addresseditbox.cpp.

431 {
432  return E_NOTIMPL;
433 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IsWindowOwner()

HRESULT STDMETHODCALLTYPE CAddressEditBox::IsWindowOwner ( HWND  hWnd)
virtual

Definition at line 304 of file addresseditbox.cpp.

305 {
306  if (fCombobox.m_hWnd == hWnd)
307  return S_OK;
308  if (fEditWindow.m_hWnd == hWnd)
309  return S_OK;
310  return S_FALSE;
311 }
CContainedWindow fEditWindow
HWND hWnd
Definition: settings.c:17
#define S_FALSE
Definition: winerror.h:2357
#define S_OK
Definition: intsafe.h:59
CContainedWindow fCombobox

◆ Load()

HRESULT STDMETHODCALLTYPE CAddressEditBox::Load ( IStream pStm)
virtual

Implements IPersistStream.

Definition at line 435 of file addresseditbox.cpp.

436 {
437  return E_NOTIMPL;
438 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OnWinEvent()

HRESULT STDMETHODCALLTYPE CAddressEditBox::OnWinEvent ( HWND  hWnd,
UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
LRESULT theResult 
)
virtual

Definition at line 254 of file addresseditbox.cpp.

256 {
257  LPNMHDR hdr;
258 
259  if (theResult)
260  *theResult = 0;
261 
262  switch (uMsg)
263  {
264  case WM_COMMAND:
265  {
266  if (HIWORD(wParam) == CBN_SELCHANGE)
267  {
268  UINT selectedIndex = SendMessageW((HWND)lParam, CB_GETCURSEL, 0, 0);
270  Execute(0);
271  }
272  break;
273  }
274  case WM_NOTIFY:
275  {
276  hdr = (LPNMHDR) lParam;
277  if (hdr->code == CBEN_ENDEDIT)
278  {
279  NMCBEENDEDITW *endEdit = (NMCBEENDEDITW*) lParam;
280  if (endEdit->iWhy == CBENF_RETURN)
281  {
282  Execute(0);
283  }
284  else if (endEdit->iWhy == CBENF_ESCAPE)
285  {
286  /* Reset the contents of the combo box */
287  }
288  }
289  else if (hdr->code == CBEN_DELETEITEM)
290  {
292  LPITEMIDLIST itemPidl = (LPITEMIDLIST)pCBEx->ceItem.lParam;
293  if (itemPidl)
294  {
295  ILFree(itemPidl);
296  }
297  }
298  break;
299  }
300  }
301  return S_OK;
302 }
#define CBEN_DELETEITEM
Definition: commctrl.h:3869
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
char hdr[14]
Definition: iptest.cpp:33
#define CB_GETITEMDATA
Definition: winuser.h:1932
#define PNMCOMBOBOXEX
Definition: commctrl.h:3864
#define CB_GETCURSEL
Definition: winuser.h:1925
WPARAM wParam
Definition: combotst.c:138
struct tagNMHDR * LPNMHDR
#define CBEN_ENDEDIT
Definition: commctrl.h:3881
virtual HRESULT STDMETHODCALLTYPE Execute(long paramC)
if(!(yy_init))
Definition: macro.lex.yy.c:714
#define CBENF_ESCAPE
Definition: commctrl.h:3885
#define WM_COMMAND
Definition: winuser.h:1722
#define S_OK
Definition: intsafe.h:59
#define CBENF_RETURN
Definition: commctrl.h:3884
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
unsigned int UINT
Definition: ndis.h:50
#define CBN_SELCHANGE
Definition: winuser.h:1961
#define HIWORD(l)
Definition: typedefs.h:246
LPITEMIDLIST pidlLastParsed
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
LPARAM lParam
Definition: combotst.c:139
#define WM_NOTIFY
Definition: richedit.h:61

◆ ParseNow()

HRESULT STDMETHODCALLTYPE CAddressEditBox::ParseNow ( long  paramC)
virtual

Definition at line 97 of file addresseditbox.cpp.

98 {
99  ULONG eaten;
100  ULONG attributes;
101  HRESULT hr;
102  HWND topLevelWindow;
103  PIDLIST_ABSOLUTE pidlCurrent= NULL;
104  PIDLIST_RELATIVE pidlRelative = NULL;
105  CComPtr<IShellFolder> psfCurrent;
106 
109  if (FAILED_UNEXPECTEDLY(hr))
110  return hr;
111 
112  hr = IUnknown_GetWindow(pbs, &topLevelWindow);
113  if (FAILED_UNEXPECTEDLY(hr))
114  return hr;
115 
116  /* Get the path to browse and expand it if needed */
117  LPWSTR input;
118  int inputLength = fCombobox.GetWindowTextLength() + 2;
119 
120  input = new WCHAR[inputLength];
121  fCombobox.GetWindowText(input, inputLength);
122 
123  LPWSTR address;
124  int addressLength = ExpandEnvironmentStrings(input, NULL, 0);
125 
126  if (addressLength <= 0)
127  {
128  address = input;
129  }
130  else
131  {
132  addressLength += 2;
133  address = new WCHAR[addressLength];
134  if (!ExpandEnvironmentStrings(input, address, addressLength))
135  {
136  delete[] address;
137  address = input;
138  }
139  }
140 
141  /* Try to parse a relative path and if it fails, try to browse an absolute path */
142  CComPtr<IShellFolder> psfDesktop;
143  hr = SHGetDesktopFolder(&psfDesktop);
144  if (FAILED_UNEXPECTEDLY(hr))
145  goto cleanup;
146 
147  hr = pbs->GetPidl(&pidlCurrent);
148  if (FAILED_UNEXPECTEDLY(hr))
149  goto cleanup;
150 
151  hr = psfDesktop->BindToObject(pidlCurrent, NULL, IID_PPV_ARG(IShellFolder, &psfCurrent));
152  if (FAILED_UNEXPECTEDLY(hr))
153  goto cleanup;
154 
155  hr = psfCurrent->ParseDisplayName(topLevelWindow, NULL, address, &eaten, &pidlRelative, &attributes);
156  if (SUCCEEDED(hr))
157  {
158  pidlLastParsed = ILCombine(pidlCurrent, pidlRelative);
159  ILFree(pidlRelative);
160  goto cleanup;
161  }
162 
163  /* We couldn't parse a relative path, attempt to parse an absolute path */
164  hr = psfDesktop->ParseDisplayName(topLevelWindow, NULL, address, &eaten, &pidlLastParsed, &attributes);
165 
166 cleanup:
167  if (pidlCurrent)
168  ILFree(pidlCurrent);
169  if (address != input)
170  delete [] address;
171  delete [] input;
172 
173  return hr;
174 }
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
HRESULT hr
Definition: shlfolder.c:183
#define ExpandEnvironmentStrings
Definition: winbase.h:3608
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:699
#define IID_PPV_ARG(Itype, ppType)
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1283
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1448
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
GLuint address
Definition: glext.h:9393
CComPtr< IUnknown > fSite
GLenum GLenum GLenum input
Definition: glext.h:9031
unsigned int ULONG
Definition: retypes.h:1
LPITEMIDLIST pidlLastParsed
char * cleanup(char *str)
Definition: wpickclick.c:99
CContainedWindow fCombobox
#define SID_SShellBrowser
Definition: shlguid.h:125
WCHAR * LPWSTR
Definition: xmlstorage.h:184
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Referenced by Execute().

◆ PopulateComboBox()

void CAddressEditBox::PopulateComboBox ( LPITEMIDLIST  pidl)
private

Definition at line 450 of file addresseditbox.cpp.

451 {
452  HRESULT hr;
453  LPITEMIDLIST pidl;
454  int indent = 0;
455  int index;
456 
458  for (int i = 0; i < index; i++)
461 
462  /* Calculate the indent level. No need to clone the pidl */
463  pidl = pidlCurrent;
464  do
465  {
466  if(!pidl->mkid.cb)
467  break;
468  pidl = ILGetNext(pidl);
469  indent++;
470  } while (pidl);
471  index = indent;
472 
473  /* Add every id from the pidl in the combo box */
474  pidl = ILClone(pidlCurrent);
475  do
476  {
477  AddComboBoxItem(pidl, 0, index);
478  ILRemoveLastID(pidl);
479  index--;
480  } while (index >= 0);
481  ILFree(pidl);
482 
483  /* Add the items of the desktop */
484  FillOneLevel(0, 1, indent);
485 
486  /* Add the items of My Computer */
488  if (FAILED_UNEXPECTEDLY(hr))
489  return;
490 
491  for(LPITEMIDLIST i = GetItemData(0); i; i = GetItemData(index))
492  {
493  if (ILIsEqual(i, pidl))
494  {
496  break;
497  }
498  index++;
499  }
500  ILFree(pidl);
501 }
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
static const WCHAR indent[]
Definition: object.c:1156
HRESULT hr
Definition: shlfolder.c:183
LPITEMIDLIST GetItemData(int index)
LPITEMIDLIST WINAPI ILGetNext(LPCITEMIDLIST pidl)
Definition: pidl.c:851
BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:535
BOOL WINAPI ILRemoveLastID(LPITEMIDLIST pidl)
Definition: pidl.c:212
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
#define CSIDL_DRIVES
Definition: shlobj.h:2027
void FillOneLevel(int index, int levelIndent, int indent)
#define CBEM_DELETEITEM
Definition: commctrl.h:3827
GLuint index
Definition: glext.h:6031
#define CB_RESETCONTENT
Definition: winuser.h:1941
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:2695
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define index(s, c)
Definition: various.h:29
void AddComboBoxItem(LPITEMIDLIST pidl, int index, int indent)
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define CB_GETCOUNT
Definition: winuser.h:1924
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41

Referenced by Invoke().

◆ QueryStatus()

HRESULT STDMETHODCALLTYPE CAddressEditBox::QueryStatus ( const GUID pguidCmdGroup,
ULONG  cCmds,
OLECMD  prgCmds[],
OLECMDTEXT pCmdText 
)
virtual

Implements IOleCommandTarget.

Definition at line 313 of file addresseditbox.cpp.

315 {
316  return E_NOTIMPL;
317 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Refresh()

HRESULT STDMETHODCALLTYPE CAddressEditBox::Refresh ( long  param8)
virtual

Definition at line 66 of file addresseditbox.cpp.

67 {
68  return E_NOTIMPL;
69 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Save() [1/2]

HRESULT STDMETHODCALLTYPE CAddressEditBox::Save ( long  paramC)
virtual

Definition at line 249 of file addresseditbox.cpp.

250 {
251  return E_NOTIMPL;
252 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Save() [2/2]

HRESULT STDMETHODCALLTYPE CAddressEditBox::Save ( IStream pStm,
BOOL  fClearDirty 
)
virtual

Implements IPersistStream.

Definition at line 440 of file addresseditbox.cpp.

441 {
442  return E_NOTIMPL;
443 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SetCurrentDir()

HRESULT STDMETHODCALLTYPE CAddressEditBox::SetCurrentDir ( long  paramC)
virtual

Definition at line 92 of file addresseditbox.cpp.

93 {
94  return E_NOTIMPL;
95 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SetOwner()

HRESULT STDMETHODCALLTYPE CAddressEditBox::SetOwner ( IUnknown pOwner)
virtual

Implements IShellService.

Definition at line 47 of file addresseditbox.cpp.

48 {
49  if (!pOwner)
50  {
51  CComPtr<IBrowserService> browserService;
53  if (SUCCEEDED(hResult))
54  AtlUnadvise(browserService, DIID_DWebBrowserEvents, fAdviseCookie);
55  fSite = NULL;
56  }
57  // connect to browser connection point
58  return 0;
59 }
#define IID_PPV_ARG(Itype, ppType)
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1448
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID *iid, DWORD dw)
Definition: atl.c:73
LONG HRESULT
Definition: typedefs.h:77
CComPtr< IUnknown > fSite
#define SID_SShellBrowser
Definition: shlguid.h:125
#define SUCCEEDED(hr)
Definition: intsafe.h:57

Member Data Documentation

◆ fAdviseCookie

DWORD CAddressEditBox::fAdviseCookie
private

Definition at line 38 of file addresseditbox.h.

Referenced by Init(), and SetOwner().

◆ fCombobox

CContainedWindow CAddressEditBox::fCombobox
private

Definition at line 36 of file addresseditbox.h.

Referenced by Init(), Invoke(), IsWindowOwner(), and ParseNow().

◆ fEditWindow

CContainedWindow CAddressEditBox::fEditWindow
private

Definition at line 37 of file addresseditbox.h.

Referenced by Init(), and IsWindowOwner().

◆ fSite

CComPtr<IUnknown> CAddressEditBox::fSite
private

Definition at line 39 of file addresseditbox.h.

Referenced by Execute(), Init(), Invoke(), ParseNow(), and SetOwner().

◆ hComboBoxEx

HWND CAddressEditBox::hComboBoxEx
private

Definition at line 41 of file addresseditbox.h.

Referenced by AddComboBoxItem(), GetItemData(), Init(), Invoke(), and PopulateComboBox().

◆ pidlLastParsed

LPITEMIDLIST CAddressEditBox::pidlLastParsed
private

Definition at line 40 of file addresseditbox.h.

Referenced by Execute(), Invoke(), OnWinEvent(), ParseNow(), and ~CAddressEditBox().


The documentation for this class was generated from the following files: