ReactOS  0.4.15-dev-1207-g698a8e6
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)
 
HRESULT STDMETHODCALLTYPE ShowFileNotFoundError (HRESULT hRet)
 

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 529 of file addresseditbox.cpp.

530 {
531  HRESULT hr;
532  WCHAR buf[4096];
533 
534  LPCITEMIDLIST pidlChild;
536  hr = SHBindToParent(pidl, IID_PPV_ARG(IShellFolder, &sf), &pidlChild);
537  if (FAILED_UNEXPECTEDLY(hr))
538  return;
539 
540  STRRET strret;
541  hr = sf->GetDisplayNameOf(pidlChild, SHGDN_FORADDRESSBAR, &strret);
542  if (FAILED_UNEXPECTEDLY(hr))
543  return;
544 
545  hr = StrRetToBufW(&strret, pidlChild, buf, 4095);
546  if (FAILED_UNEXPECTEDLY(hr))
547  return;
548 
549  COMBOBOXEXITEMW item = {0};
551  item.iImage = SHMapPIDLToSystemImageListIndex(sf, pidlChild, &item.iSelectedImage);
552  item.pszText = buf;
553  item.lParam = (LPARAM)(ILClone(pidl));
554  item.iIndent = indent;
555  item.iItem = index;
557 }
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:79
#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:1337
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 339 of file addresseditbox.cpp.

341 {
342  return E_NOTIMPL;
343 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Execute()

HRESULT STDMETHODCALLTYPE CAddressEditBox::Execute ( long  paramC)
virtual

Definition at line 190 of file addresseditbox.cpp.

191 {
192  HRESULT hr;
193 
194  /*
195  * Parse the path is it wasn't parsed
196  */
197  if (!pidlLastParsed)
198  hr = ParseNow(0);
199 
200  /*
201  * If the destination path doesn't exist then display an error message
202  */
204  return ShowFileNotFoundError(hr);
205 
206  if (!pidlLastParsed)
207  return E_FAIL;
208 
209  /*
210  * Get the IShellBrowser and IBrowserService interfaces of the shell browser
211  */
214  if (FAILED(hr))
215  return hr;
216 
218  pisb->QueryInterface(IID_PPV_ARG(IBrowserService, &pbs));
219  if (FAILED(hr))
220  return hr;
221 
222  /*
223  * Get the current pidl of the shellbrowser and check if it is the same with the parsed one
224  */
225  PIDLIST_ABSOLUTE pidl;
226  hr = pbs->GetPidl(&pidl);
227  if (FAILED(hr))
228  return hr;
229 
231  hr = SHGetDesktopFolder(&psf);
232  if (FAILED(hr))
233  return hr;
234 
235  hr = psf->CompareIDs(0, pidl, pidlLastParsed);
236 
237  SHFree(pidl);
238  if (hr == 0)
239  return S_OK;
240 
241  /*
242  * Attempt to browse to the parsed pidl
243  */
244  hr = pisb->BrowseObject(pidlLastParsed, 0);
245  if (SUCCEEDED(hr))
246  return hr;
247 
248  /*
249  * Browsing to the pidl failed so it's not a folder. So invoke its defaule command.
250  */
251  HWND topLevelWindow;
252  hr = IUnknown_GetWindow(pisb, &topLevelWindow);
253  if (FAILED(hr))
254  return hr;
255 
256  LPCITEMIDLIST pidlChild;
259  if (FAILED(hr))
260  return hr;
261 
262  hr = SHInvokeDefaultCommand(topLevelWindow, sf, pidlChild);
263  if (FAILED(hr))
264  return hr;
265 
266  return hr;
267 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
HRESULT hr
Definition: shlfolder.c:183
HRESULT WINAPI SHInvokeDefaultCommand(HWND hWnd, IShellFolder *lpFolder, LPCITEMIDLIST lpApidl)
Definition: ordinal.c:2974
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:1329
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1494
#define ERROR_FILE_NOT_FOUND
Definition: disk.h:79
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
LONG HRESULT
Definition: typedefs.h:79
#define ERROR_INVALID_DRIVE
Definition: winerror.h:118
CComPtr< IUnknown > fSite
#define S_OK
Definition: intsafe.h:51
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
Definition: pidl.c:1337
HRESULT STDMETHODCALLTYPE ShowFileNotFoundError(HRESULT hRet)
void WINAPI SHFree(LPVOID pv)
Definition: shellole.c:331
LPITEMIDLIST pidlLastParsed
#define SID_SShellBrowser
Definition: shlguid.h:125
#define SUCCEEDED(hr)
Definition: intsafe.h:49

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 559 of file addresseditbox.cpp.

560 {
561  HRESULT hr;
562  ULONG numObj;
563  int count;
564  LPITEMIDLIST pidl, pidl2, pidl3, pidl4;
565 
566  count = index + 1;
567  pidl = GetItemData(index);
568  pidl2 = GetItemData(count);
569  if(pidl)
570  {
571  CComPtr<IShellFolder> psfDesktop;
572  CComPtr<IShellFolder> psfItem;
573 
574  hr = SHGetDesktopFolder(&psfDesktop);
575  if (FAILED_UNEXPECTEDLY(hr))
576  return;
577 
578  if (!pidl->mkid.cb)
579  {
580  psfItem = psfDesktop;
581  }
582  else
583  {
584  hr = psfDesktop->BindToObject(pidl, NULL, IID_PPV_ARG(IShellFolder, &psfItem));
585  if (FAILED_UNEXPECTEDLY(hr))
586  return;
587  }
588 
589  CComPtr<IEnumIDList> pEnumIDList;
590  hr = psfItem->EnumObjects(0, SHCONTF_FOLDERS | SHCONTF_INCLUDEHIDDEN, &pEnumIDList);
591  if (FAILED_UNEXPECTEDLY(hr))
592  return;
593 
594  do
595  {
596  hr = pEnumIDList->Next(1, &pidl3, &numObj);
597  if(hr != S_OK || !numObj)
598  break;
599 
600  pidl4 = ILCombine(pidl, pidl3);
601  if (pidl2 && ILIsEqual(pidl4, pidl2))
602  count += (indent - levelIndent);
603  else
604  AddComboBoxItem(pidl4, count, levelIndent);
605  count++;
606  ILFree(pidl3);
607  ILFree(pidl4);
608  } while (true);
609  }
610 }
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:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
void AddComboBoxItem(LPITEMIDLIST pidl, int index, int indent)
#define S_OK
Definition: intsafe.h:51
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 448 of file addresseditbox.cpp.

449 {
450  if (pClassID == NULL)
451  return E_POINTER;
452  *pClassID = CLSID_AddressEditBox;
453  return S_OK;
454 }
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:51
#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 355 of file addresseditbox.cpp.

357 {
358  return E_NOTIMPL;
359 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetItemData()

LPITEMIDLIST CAddressEditBox::GetItemData ( int  index)
private

Definition at line 612 of file addresseditbox.cpp.

613 {
615 
616  memset(&item, 0, sizeof(COMBOBOXEXITEMW));
617  item.mask = CBEIF_LPARAM;
618  item.iItem = index;
620  return (LPITEMIDLIST)item.lParam;
621 }
#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 471 of file addresseditbox.cpp.

472 {
473  return E_NOTIMPL;
474 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetTypeInfo()

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

Implements IDispatch.

Definition at line 350 of file addresseditbox.cpp.

351 {
352  return E_NOTIMPL;
353 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetTypeInfoCount()

HRESULT STDMETHODCALLTYPE CAddressEditBox::GetTypeInfoCount ( UINT pctinfo)
virtual

Implements IDispatch.

Definition at line 345 of file addresseditbox.cpp.

346 {
347  return E_NOTIMPL;
348 }
#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:1494
#define SHACF_FILESYSTEM
Definition: shlwapi.h:1912
LONG HRESULT
Definition: typedefs.h:79
BOOL SubclassWindow(HWND hWnd)
Definition: atlwin.h:1698
CComPtr< IUnknown > fSite
#define SHACF_USETAB
Definition: shlwapi.h:1916
CContainedWindow fCombobox
#define SID_SShellBrowser
Definition: shlguid.h:125
HRESULT WINAPI SHAutoComplete(HWND hwndEdit, DWORD dwFlags)
Definition: autocomp.cpp:191
#define SUCCEEDED(hr)
Definition: intsafe.h:49

◆ 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 361 of file addresseditbox.cpp.

363 {
366  HRESULT hr;
367  PIDLIST_ABSOLUTE absolutePIDL;
368  LPCITEMIDLIST pidlChild;
369  STRRET ret;
370  WCHAR buf[4096];
371 
372  if (pDispParams == NULL)
373  return E_INVALIDARG;
374 
375  switch (dispIdMember)
376  {
379 
380  if (pidlLastParsed)
383 
384  /* Get the current pidl of the browser */
385  hr = IUnknown_QueryService(fSite, SID_STopLevelBrowser, IID_PPV_ARG(IBrowserService, &isb));
386  if (FAILED_UNEXPECTEDLY(hr))
387  return hr;
388 
389  hr = isb->GetPidl(&absolutePIDL);
390  if (FAILED_UNEXPECTEDLY(hr))
391  return hr;
392 
393  if (!absolutePIDL)
394  {
395  ERR("Got no PIDL, investigate me!\n");
396  return S_OK;
397  }
398 
399  /* Fill the combobox */
400  PopulateComboBox(absolutePIDL);
401 
402  /* Find the current item in the combobox and select it */
403  CComPtr<IShellFolder> psfDesktop;
404  hr = SHGetDesktopFolder(&psfDesktop);
405  if (FAILED_UNEXPECTEDLY(hr))
406  return S_OK;
407 
408  hr = psfDesktop->GetDisplayNameOf(absolutePIDL, SHGDN_FORADDRESSBAR, &ret);
409  if (FAILED_UNEXPECTEDLY(hr))
410  return S_OK;
411 
412  hr = StrRetToBufW(&ret, absolutePIDL, buf, 4095);
413  if (FAILED_UNEXPECTEDLY(hr))
414  return S_OK;
415 
417  if (index != -1)
419 
420  /* Add the item that will be visible when the combobox is not expanded */
421  hr = SHBindToParent(absolutePIDL, IID_PPV_ARG(IShellFolder, &sf), &pidlChild);
422  if (FAILED_UNEXPECTEDLY(hr))
423  return hr;
424 
425  hr = sf->GetDisplayNameOf(pidlChild, SHGDN_FORADDRESSBAR | SHGDN_FORPARSING, &ret);
426  if (FAILED_UNEXPECTEDLY(hr))
427  return hr;
428 
429  hr = StrRetToBufW(&ret, pidlChild, buf, 4095);
430  if (FAILED_UNEXPECTEDLY(hr))
431  return hr;
432 
433  INT indexClosed, indexOpen;
434  indexClosed = SHMapPIDLToSystemImageListIndex(sf, pidlChild, &indexOpen);
435 
436  COMBOBOXEXITEMW item = {0};
438  item.iItem = -1;
439  item.iImage = indexClosed;
440  item.iSelectedImage = indexOpen;
441  item.pszText = buf;
442  item.lParam = reinterpret_cast<LPARAM>(absolutePIDL);
443  fCombobox.SendMessage(CBEM_SETITEM, 0, reinterpret_cast<LPARAM>(&item));
444  }
445  return S_OK;
446 }
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:58
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1494
#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:79
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
int ret
#define CB_SETCURSEL
Definition: winuser.h:1943
void PopulateComboBox(LPITEMIDLIST pidl)
#define ERR(fmt,...)
Definition: debug.h:110
CComPtr< IUnknown > fSite
#define S_OK
Definition: intsafe.h:51
static ATOM item
Definition: dde.c:856
HRESULT WINAPI SHBindToParent(LPCITEMIDLIST pidl, REFIID riid, LPVOID *ppv, LPCITEMIDLIST *ppidlLast)
Definition: pidl.c:1337
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 456 of file addresseditbox.cpp.

457 {
458  return E_NOTIMPL;
459 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IsWindowOwner()

HRESULT STDMETHODCALLTYPE CAddressEditBox::IsWindowOwner ( HWND  hWnd)
virtual

Definition at line 324 of file addresseditbox.cpp.

325 {
326  if (fCombobox.m_hWnd == hWnd)
327  return S_OK;
328  if (fEditWindow.m_hWnd == hWnd)
329  return S_OK;
330  return S_FALSE;
331 }
CContainedWindow fEditWindow
HWND hWnd
Definition: settings.c:17
#define S_FALSE
Definition: winerror.h:2357
#define S_OK
Definition: intsafe.h:51
CContainedWindow fCombobox

◆ Load()

HRESULT STDMETHODCALLTYPE CAddressEditBox::Load ( IStream pStm)
virtual

Implements IPersistStream.

Definition at line 461 of file addresseditbox.cpp.

462 {
463  return E_NOTIMPL;
464 }
#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 274 of file addresseditbox.cpp.

276 {
277  LPNMHDR hdr;
278 
279  if (theResult)
280  *theResult = 0;
281 
282  switch (uMsg)
283  {
284  case WM_COMMAND:
285  {
286  if (HIWORD(wParam) == CBN_SELCHANGE)
287  {
288  UINT selectedIndex = SendMessageW((HWND)lParam, CB_GETCURSEL, 0, 0);
290  Execute(0);
291  }
292  break;
293  }
294  case WM_NOTIFY:
295  {
296  hdr = (LPNMHDR) lParam;
297  if (hdr->code == CBEN_ENDEDIT)
298  {
299  NMCBEENDEDITW *endEdit = (NMCBEENDEDITW*) lParam;
300  if (endEdit->iWhy == CBENF_RETURN)
301  {
302  Execute(0);
303  }
304  else if (endEdit->iWhy == CBENF_ESCAPE)
305  {
306  /* Reset the contents of the combo box */
307  }
308  }
309  else if (hdr->code == CBEN_DELETEITEM)
310  {
312  LPITEMIDLIST itemPidl = (LPITEMIDLIST)pCBEx->ceItem.lParam;
313  if (itemPidl)
314  {
315  ILFree(itemPidl);
316  }
317  }
318  break;
319  }
320  }
321  return S_OK;
322 }
#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:51
#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:247
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 parseabsolute;
150 
151  hr = psfDesktop->BindToObject(pidlCurrent, NULL, IID_PPV_ARG(IShellFolder, &psfCurrent));
152  if (FAILED_UNEXPECTEDLY(hr))
153  goto parseabsolute;
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 parseabsolute:
164  /* We couldn't parse a relative path, attempt to parse an absolute path */
165  hr = psfDesktop->ParseDisplayName(topLevelWindow, NULL, address, &eaten, &pidlLastParsed, &attributes);
166 
167 cleanup:
168  if (pidlCurrent)
169  ILFree(pidlCurrent);
170  if (address != input)
171  delete [] address;
172  delete [] input;
173 
174  return hr;
175 }
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
HRESULT hr
Definition: shlfolder.c:183
#define ExpandEnvironmentStrings
Definition: winbase.h:3614
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:1329
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1494
smooth NULL
Definition: ftsmooth.c:416
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
__wchar_t WCHAR
Definition: xmlstorage.h:180
LONG HRESULT
Definition: typedefs.h:79
#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:49

Referenced by Execute().

◆ PopulateComboBox()

void CAddressEditBox::PopulateComboBox ( LPITEMIDLIST  pidl)
private

Definition at line 476 of file addresseditbox.cpp.

477 {
478  HRESULT hr;
479  LPITEMIDLIST pidl;
480  int indent = 0;
481  int index;
482 
484  for (int i = 0; i < index; i++)
487 
488  /* Calculate the indent level. No need to clone the pidl */
489  pidl = pidlCurrent;
490  do
491  {
492  if(!pidl->mkid.cb)
493  break;
494  pidl = ILGetNext(pidl);
495  indent++;
496  } while (pidl);
497  index = indent;
498 
499  /* Add every id from the pidl in the combo box */
500  pidl = ILClone(pidlCurrent);
501  do
502  {
503  AddComboBoxItem(pidl, 0, index);
504  ILRemoveLastID(pidl);
505  index--;
506  } while (index >= 0);
507  ILFree(pidl);
508 
509  /* Add the items of the desktop */
510  FillOneLevel(0, 1, indent);
511 
512  /* Add the items of My Computer */
514  if (FAILED_UNEXPECTEDLY(hr))
515  return;
516 
517  for(LPITEMIDLIST i = GetItemData(0); i; i = GetItemData(index))
518  {
519  if (ILIsEqual(i, pidl))
520  {
522  break;
523  }
524  index++;
525  }
526  ILFree(pidl);
527 }
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:2028
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:2830
LONG HRESULT
Definition: typedefs.h:79
#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 333 of file addresseditbox.cpp.

335 {
336  return E_NOTIMPL;
337 }
#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 269 of file addresseditbox.cpp.

270 {
271  return E_NOTIMPL;
272 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Save() [2/2]

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

Implements IPersistStream.

Definition at line 466 of file addresseditbox.cpp.

467 {
468  return E_NOTIMPL;
469 }
#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:1494
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:79
CComPtr< IUnknown > fSite
#define SID_SShellBrowser
Definition: shlguid.h:125
#define SUCCEEDED(hr)
Definition: intsafe.h:49

◆ ShowFileNotFoundError()

HRESULT STDMETHODCALLTYPE CAddressEditBox::ShowFileNotFoundError ( HRESULT  hRet)
private

Definition at line 177 of file addresseditbox.cpp.

178 {
180  int inputLength = fCombobox.GetWindowTextLength() + 2;
181 
182  input.Allocate(inputLength);
183  fCombobox.GetWindowText(input, inputLength);
184 
186 
187  return hRet;
188 }
#define IDS_PARSE_ADDR_ERR_TITLE
Definition: resource.h:177
#define IDS_PARSE_ADDR_ERR_TEXT
Definition: resource.h:178
#define MB_ICONERROR
Definition: winuser.h:781
GLenum GLenum GLenum input
Definition: glext.h:9031
#define ShellMessageBoxW
Definition: precomp.h:58
#define MB_OK
Definition: winuser.h:784
CContainedWindow fCombobox
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582

Referenced by Execute().

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(), ParseNow(), and ShowFileNotFoundError().

◆ 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: