ReactOS  0.4.14-dev-50-g13bb5e2
CAddressBand Class Reference

#include <addressband.h>

Inheritance diagram for CAddressBand:
Collaboration diagram for CAddressBand:

Public Member Functions

 CAddressBand ()
 
virtual ~CAddressBand ()
 
virtual HRESULT STDMETHODCALLTYPE GetBandInfo (DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi)
 
virtual HRESULT STDMETHODCALLTYPE SetSite (IUnknown *pUnkSite)
 
virtual HRESULT STDMETHODCALLTYPE GetSite (REFIID riid, void **ppvSite)
 
virtual HRESULT STDMETHODCALLTYPE GetWindow (HWND *lphwnd)
 
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp (BOOL fEnterMode)
 
virtual HRESULT STDMETHODCALLTYPE CloseDW (DWORD dwReserved)
 
virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW (const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
 
virtual HRESULT STDMETHODCALLTYPE ShowDW (BOOL fShow)
 
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 UIActivateIO (BOOL fActivate, LPMSG lpMsg)
 
virtual HRESULT STDMETHODCALLTYPE HasFocusIO ()
 
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO (LPMSG lpMsg)
 
virtual HRESULT STDMETHODCALLTYPE OnWinEvent (HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
 
virtual HRESULT STDMETHODCALLTYPE IsWindowOwner (HWND hWnd)
 
virtual HRESULT STDMETHODCALLTYPE FileSysChange (long param8, long paramC)
 
virtual HRESULT STDMETHODCALLTYPE Refresh (long param8)
 
virtual HRESULT STDMETHODCALLTYPE QueryService (REFGUID guidService, REFIID riid, void **ppvObject)
 
virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS (IUnknown *punkObj, BOOL fSetFocus)
 
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)
 
LRESULT OnNotifyClick (WPARAM wParam, NMHDR *notifyHeader, BOOL &bHandled)
 
LRESULT OnTipText (UINT idControl, NMHDR *notifyHeader, BOOL &bHandled)
 
LRESULT OnEraseBackground (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnSize (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
LRESULT OnWindowPosChanging (UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
 
- 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 IDockingWindow
HRESULT ResizeBorderDW ([in] LPCRECT prcBorder, [in] IUnknown *punkToolbarSite, [in] BOOL fReserved)
 
- Public Member Functions inherited from IUnknown
HRESULT QueryInterface ([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
 
ULONG AddRef ()
 
ULONG Release ()
 
- Public Member Functions inherited from IObjectWithSite
HRESULT GetSite ([in] REFIID riid, [out, iid_is(riid)] PVOID *ppvSite)
 
- Public Member Functions inherited from IServiceProvider
HRESULT RemoteQueryService ([in] REFGUID guidService, [in] REFIID riid, [out, iid_is(riid)] IUnknown **ppvObject)
 

Private Member Functions

void FocusChange (BOOL bFocus)
 
void CreateGoButton ()
 

Private Attributes

CComPtr< IDockingWindowSite > fSite
 
CComPtr< IAddressEditBox > fAddressEditBox
 
HWND fEditControl
 
HWND fGoButton
 
HWND fComboBox
 
bool fGoButtonShown
 
HIMAGELIST m_himlNormal
 
HIMAGELIST m_himlHot
 

Additional Inherited Members

- Public Types inherited from IOleWindow
typedef IOleWindowLPOLEWINDOW
 
- Public Types inherited from IUnknown
typedef IUnknownLPUNKNOWN
 
- Public Types inherited from IObjectWithSite
typedef IObjectWithSiteLPOBJECTWITHSITE
 
- Public Types inherited from IPersistStream
typedef IPersistStreamLPPERSISTSTREAM
 
- Public Types inherited from IPersist
typedef IPersistLPPERSIST
 
- 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 IServiceProvider
typedef IServiceProviderLPSERVICEPROVIDER
 
- 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
 

Detailed Description

Definition at line 23 of file addressband.h.

Constructor & Destructor Documentation

◆ CAddressBand()

CAddressBand::CAddressBand ( )

Definition at line 40 of file addressband.cpp.

41 {
43  fGoButton = NULL;
44  fComboBox = NULL;
45  fGoButtonShown = false;
46 }
HWND fComboBox
Definition: addressband.h:42
HWND fEditControl
Definition: addressband.h:40
bool fGoButtonShown
Definition: addressband.h:43
smooth NULL
Definition: ftsmooth.c:416
HWND fGoButton
Definition: addressband.h:41

◆ ~CAddressBand()

CAddressBand::~CAddressBand ( )
virtual

Definition at line 48 of file addressband.cpp.

49 {
50 }

Member Function Documentation

◆ CloseDW()

HRESULT STDMETHODCALLTYPE CAddressBand::CloseDW ( DWORD  dwReserved)
virtual

Implements IDockingWindow.

Definition at line 198 of file addressband.cpp.

199 {
200  ShowDW(FALSE);
201 
202  if (IsWindow())
203  DestroyWindow();
204 
205  m_hWnd = NULL;
206 
207  CComPtr<IShellService> pservice;
208  HRESULT hres = fAddressEditBox->QueryInterface(IID_PPV_ARG(IShellService, &pservice));
209  if (SUCCEEDED(hres ))
210  pservice->SetOwner(NULL);
211 
213  if (fSite) fSite.Release();
214 
215  if (m_himlNormal)
217 
218  if (m_himlHot)
220 
221  return S_OK;
222 }
BOOL WINAPI IsWindow(_In_opt_ HWND)
CComPtr< IDockingWindowSite > fSite
Definition: addressband.h:38
#define IID_PPV_ARG(Itype, ppType)
BOOL WINAPI DestroyWindow(_In_ HWND)
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
HIMAGELIST m_himlHot
Definition: addressband.h:45
virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow)
smooth NULL
Definition: ftsmooth.c:416
HRESULT hres
Definition: protocol.c:465
LONG HRESULT
Definition: typedefs.h:77
HIMAGELIST m_himlNormal
Definition: addressband.h:44
#define S_OK
Definition: intsafe.h:59
void Release()
Definition: atlcomcli.h:140
CComPtr< IAddressEditBox > fAddressEditBox
Definition: addressband.h:39
#define SUCCEEDED(hr)
Definition: intsafe.h:57

◆ ContextSensitiveHelp()

HRESULT STDMETHODCALLTYPE CAddressBand::ContextSensitiveHelp ( BOOL  fEnterMode)
virtual

Implements IOleWindow.

Definition at line 193 of file addressband.cpp.

194 {
195  return E_NOTIMPL;
196 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ CreateGoButton()

void CAddressBand::CreateGoButton ( )
private

Definition at line 545 of file addressband.cpp.

546 {
547  const TBBUTTON buttonInfo [] = { { 0, 1, TBSTATE_ENABLED, 0 } };
548  HINSTANCE shellInstance;
549 
550  shellInstance = _AtlBaseModule.GetResourceInstance();
552  20, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
554  20, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
555 
559  0, 0, 0, 0, m_hWnd, NULL, _AtlBaseModule.GetModuleInstance(), NULL);
562  if (m_himlNormal)
563  SendMessage(fGoButton, TB_SETIMAGELIST, 0, reinterpret_cast<LPARAM>(m_himlNormal));
564  if (m_himlHot)
565  SendMessage(fGoButton, TB_SETHOTIMAGELIST, 0, reinterpret_cast<LPARAM>(m_himlHot));
567  reinterpret_cast<WPARAM>(_AtlBaseModule.GetResourceInstance()), IDS_GOBUTTONLABEL);
568  SendMessage(fGoButton, TB_ADDBUTTONSW, 1, (LPARAM) &buttonInfo);
569 }
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define TB_SETHOTIMAGELIST
Definition: commctrl.h:1126
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define TB_BUTTONSTRUCTSIZE
Definition: commctrl.h:1106
#define TB_ADDSTRINGW
Definition: commctrl.h:1104
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:915
#define WS_CHILD
Definition: pedump.c:617
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
#define TB_SETMAXTEXTROWS
Definition: commctrl.h:1134
#define CCS_NODIVIDER
Definition: commctrl.h:2220
HIMAGELIST m_himlHot
Definition: addressband.h:45
#define CreateWindowEx
Definition: winuser.h:5656
smooth NULL
Definition: ftsmooth.c:416
LONG_PTR LPARAM
Definition: windef.h:208
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2218
#define TB_SETIMAGELIST
Definition: commctrl.h:1122
#define RGB(r, g, b)
Definition: wingdi.h:2935
#define TBSTYLE_TOOLTIPS
Definition: commctrl.h:961
#define IDS_GOBUTTONLABEL
Definition: resource.h:119
#define CCS_NORESIZE
Definition: commctrl.h:2217
#define TB_ADDBUTTONSW
Definition: commctrl.h:1238
HWND fGoButton
Definition: addressband.h:41
#define IDB_GOBUTTON_HOT
Definition: undocshell.h:626
HIMAGELIST m_himlNormal
Definition: addressband.h:44
#define LR_CREATEDIBSECTION
Definition: winuser.h:1088
#define IMAGE_BITMAP
Definition: winuser.h:211
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
Definition: imagelist.c:2208
#define SendMessage
Definition: winuser.h:5744
#define TBSTATE_ENABLED
Definition: commctrl.h:946
#define IDB_GOBUTTON_NORMAL
Definition: undocshell.h:625
#define TBSTYLE_LIST
Definition: commctrl.h:965
#define TBSTYLE_FLAT
Definition: commctrl.h:964

Referenced by OnSize(), OnWindowPosChanging(), OnWinEvent(), and SetSite().

◆ Exec()

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

Implements IOleCommandTarget.

Definition at line 248 of file addressband.cpp.

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

◆ FileSysChange()

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

Definition at line 342 of file addressband.cpp.

343 {
344  CComPtr<IAddressBand> addressBand;
345  HRESULT hResult;
346 
347  hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IAddressBand, &addressBand));
348  if (FAILED_UNEXPECTEDLY(hResult))
349  return hResult;
350  return addressBand->FileSysChange(param8, paramC);
351 }
#define IID_PPV_ARG(Itype, ppType)
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
CComPtr< IAddressEditBox > fAddressEditBox
Definition: addressband.h:39

◆ FocusChange()

void CAddressBand::FocusChange ( BOOL  bFocus)
private

Definition at line 52 of file addressband.cpp.

53 {
54 // m_bFocus = bFocus;
55 
56  //Inform the input object site that the focus has changed.
57  if (fSite)
58  {
59 #if 0
60  fSite->OnFocusChangeIS((IDockingWindow *)this, bFocus);
61 #endif
62  }
63 }
CComPtr< IDockingWindowSite > fSite
Definition: addressband.h:38

◆ GetBandInfo()

HRESULT STDMETHODCALLTYPE CAddressBand::GetBandInfo ( DWORD  dwBandID,
DWORD  dwViewMode,
DESKBANDINFO pdbi 
)
virtual

Implements IDeskBand.

Definition at line 65 of file addressband.cpp.

66 {
67  if (!m_hWnd || !pdbi) return E_FAIL; /* Verify window exists */
68  if (pdbi->dwMask & DBIM_MINSIZE)
69  {
70  if (fGoButtonShown)
71  pdbi->ptMinSize.x = 100;
72  else
73  pdbi->ptMinSize.x = 150;
74  pdbi->ptMinSize.y = 22;
75  }
76  if (pdbi->dwMask & DBIM_MAXSIZE)
77  {
78  pdbi->ptMaxSize.x = 0;
79  pdbi->ptMaxSize.y = 0;
80  }
81  if (pdbi->dwMask & DBIM_INTEGRAL)
82  {
83  pdbi->ptIntegral.x = 0;
84  pdbi->ptIntegral.y = 0;
85  }
86  if (pdbi->dwMask & DBIM_ACTUAL)
87  {
88  if (fGoButtonShown)
89  pdbi->ptActual.x = 100;
90  else
91  pdbi->ptActual.x = 150;
92  pdbi->ptActual.y = 22;
93  }
94  if (pdbi->dwMask & DBIM_TITLE)
95  {
96  if (!LoadStringW(_AtlBaseModule.GetResourceInstance(), IDS_ADDRESSBANDLABEL, pdbi->wszTitle, _countof(pdbi->wszTitle)))
98  }
99 
100  if (pdbi->dwMask & DBIM_MODEFLAGS)
101  pdbi->dwModeFlags = DBIMF_UNDELETEABLE;
102  if (pdbi->dwMask & DBIM_BKCOLOR)
103  pdbi->crBkgnd = 0;
104  return S_OK;
105 }
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define _countof(array)
Definition: fontsub.cpp:30
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
#define E_FAIL
Definition: ddrawi.h:102
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
bool fGoButtonShown
Definition: addressband.h:43
#define IDS_ADDRESSBANDLABEL
Definition: resource.h:123
#define S_OK
Definition: intsafe.h:59

◆ GetClassID()

HRESULT STDMETHODCALLTYPE CAddressBand::GetClassID ( CLSID pClassID)
virtual

Implements IPersist.

Definition at line 374 of file addressband.cpp.

375 {
376  if (pClassID == NULL)
377  return E_POINTER;
378  *pClassID = CLSID_SH_AddressBand;
379  return S_OK;
380 }
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ GetSite()

HRESULT STDMETHODCALLTYPE CAddressBand::GetSite ( REFIID  riid,
void **  ppvSite 
)
virtual

Definition at line 178 of file addressband.cpp.

179 {
180  if (fSite == NULL)
181  return E_FAIL;
182  return fSite->QueryInterface(riid, ppvSite);
183 }
REFIID riid
Definition: precomp.h:44
CComPtr< IDockingWindowSite > fSite
Definition: addressband.h:38
#define E_FAIL
Definition: ddrawi.h:102
smooth NULL
Definition: ftsmooth.c:416

◆ GetSizeMax()

HRESULT STDMETHODCALLTYPE CAddressBand::GetSizeMax ( ULARGE_INTEGER pcbSize)
virtual

Implements IPersistStream.

Definition at line 399 of file addressband.cpp.

400 {
401  // incomplete
402  return E_NOTIMPL;
403 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ GetWindow()

HRESULT STDMETHODCALLTYPE CAddressBand::GetWindow ( HWND lphwnd)
virtual

Implements IOleWindow.

Definition at line 185 of file addressband.cpp.

186 {
187  if (lphwnd == NULL)
188  return E_POINTER;
189  *lphwnd = m_hWnd;
190  return S_OK;
191 }
smooth NULL
Definition: ftsmooth.c:416
#define S_OK
Definition: intsafe.h:59
#define E_POINTER
Definition: winerror.h:2365

◆ HasFocusIO()

HRESULT STDMETHODCALLTYPE CAddressBand::HasFocusIO ( )
virtual

Definition at line 255 of file addressband.cpp.

256 {
258  return S_OK;
259  return S_FALSE;
260 }
#define CB_GETDROPPEDSTATE
Definition: winuser.h:1927
HWND fEditControl
Definition: addressband.h:40
#define S_FALSE
Definition: winerror.h:2357
#define S_OK
Definition: intsafe.h:59
HWND WINAPI GetFocus(void)
Definition: window.c:1905
#define SendMessage
Definition: winuser.h:5744

◆ IsDirty()

HRESULT STDMETHODCALLTYPE CAddressBand::IsDirty ( void  )
virtual

Implements IPersistStream.

Definition at line 382 of file addressband.cpp.

383 {
384  return E_NOTIMPL;
385 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ IsWindowOwner()

HRESULT STDMETHODCALLTYPE CAddressBand::IsWindowOwner ( HWND  hWnd)
virtual

Definition at line 327 of file addressband.cpp.

328 {
329  CComPtr<IWinEventHandler> winEventHandler;
330  HRESULT hResult;
331 
332  if (fAddressEditBox)
333  {
334  hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IWinEventHandler, &winEventHandler));
335  if (FAILED_UNEXPECTEDLY(hResult))
336  return hResult;
337  return winEventHandler->IsWindowOwner(hWnd);
338  }
339  return S_FALSE;
340 }
HWND hWnd
Definition: settings.c:17
#define IID_PPV_ARG(Itype, ppType)
#define S_FALSE
Definition: winerror.h:2357
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
CComPtr< IAddressEditBox > fAddressEditBox
Definition: addressband.h:39

◆ Load()

HRESULT STDMETHODCALLTYPE CAddressBand::Load ( IStream pStm)
virtual

Implements IPersistStream.

Definition at line 387 of file addressband.cpp.

388 {
389  // incomplete
390  return E_NOTIMPL;
391 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OnEraseBackground()

LRESULT CAddressBand::OnEraseBackground ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 433 of file addressband.cpp.

434 {
435  POINT pt;
436  POINT ptOrig;
437  HWND parentWindow;
438  LRESULT result;
439 
440  if (fGoButtonShown == false)
441  {
442  bHandled = FALSE;
443  return 0;
444  }
445  pt.x = 0;
446  pt.y = 0;
447  parentWindow = GetParent();
448  ::MapWindowPoints(m_hWnd, parentWindow, &pt, 1);
449  OffsetWindowOrgEx(reinterpret_cast<HDC>(wParam), pt.x, pt.y, &ptOrig);
450  result = SendMessage(parentWindow, WM_ERASEBKGND, wParam, 0);
451  SetWindowOrgEx(reinterpret_cast<HDC>(wParam), ptOrig.x, ptOrig.y, NULL);
452  if (result == 0)
453  {
454  bHandled = FALSE;
455  return 0;
456  }
457  return result;
458 }
BOOL WINAPI OffsetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
Definition: coord.c:900
long y
Definition: polytest.cpp:48
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
long x
Definition: polytest.cpp:48
#define pt(x, y)
Definition: drawing.c:79
WPARAM wParam
Definition: combotst.c:138
bool fGoButtonShown
Definition: addressband.h:43
smooth NULL
Definition: ftsmooth.c:416
HWND WINAPI GetParent(_In_ HWND)
#define SendMessage
Definition: winuser.h:5744
BOOL WINAPI SetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
Definition: coord.c:532
#define WM_ERASEBKGND
Definition: winuser.h:1607
LONG_PTR LRESULT
Definition: windef.h:209
GLuint64EXT * result
Definition: glext.h:11304

◆ OnFocusChangeIS()

HRESULT STDMETHODCALLTYPE CAddressBand::OnFocusChangeIS ( IUnknown punkObj,
BOOL  fSetFocus 
)
virtual

Definition at line 369 of file addressband.cpp.

370 {
371  return E_NOTIMPL;
372 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ OnNotifyClick()

LRESULT CAddressBand::OnNotifyClick ( WPARAM  wParam,
NMHDR notifyHeader,
BOOL bHandled 
)

Definition at line 405 of file addressband.cpp.

406 {
407  if (notifyHeader->hwndFrom == fGoButton)
408  {
409  fAddressEditBox->Execute(0);
410  }
411  return 0;
412 }
HWND fGoButton
Definition: addressband.h:41
HWND hwndFrom
Definition: winuser.h:3131
CComPtr< IAddressEditBox > fAddressEditBox
Definition: addressband.h:39

◆ OnSize()

LRESULT CAddressBand::OnSize ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 460 of file addressband.cpp.

461 {
462  RECT goButtonBounds;
463  RECT buttonBounds;
464  long buttonWidth;
465  long buttonHeight;
466  RECT comboBoxBounds;
467  long newHeight;
468  long newWidth;
469 
470  if (fGoButtonShown == false)
471  {
472  bHandled = FALSE;
473  return 0;
474  }
475 
476  newHeight = HIWORD(lParam);
477  newWidth = LOWORD(lParam);
478 
479  if (!fGoButton)
480  CreateGoButton();
481 
482  SendMessage(fGoButton, TB_GETITEMRECT, 0, reinterpret_cast<LPARAM>(&buttonBounds));
483  buttonWidth = buttonBounds.right - buttonBounds.left;
484  buttonHeight = buttonBounds.bottom - buttonBounds.top;
485 
486  DefWindowProc(WM_SIZE, wParam, MAKELONG(newWidth - buttonWidth - 2, newHeight));
487  ::GetWindowRect(fComboBox, &comboBoxBounds);
488  ::SetWindowPos(fGoButton, NULL, newWidth - buttonWidth, (comboBoxBounds.bottom - comboBoxBounds.top - buttonHeight) / 2,
489  buttonWidth, buttonHeight, SWP_NOOWNERZORDER | SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER);
490 
491  goButtonBounds.left = newWidth - buttonWidth;
492  goButtonBounds.top = 0;
493  goButtonBounds.right = newWidth - buttonWidth;
494  goButtonBounds.bottom = newHeight;
495  InvalidateRect(&goButtonBounds, TRUE);
496 
498  return 0;
499 }
#define TRUE
Definition: types.h:120
#define CB_SETDROPPEDWIDTH
Definition: winuser.h:1944
HWND fComboBox
Definition: addressband.h:42
LONG top
Definition: windef.h:292
LONG left
Definition: windef.h:291
#define SWP_NOZORDER
Definition: winuser.h:1232
LONG right
Definition: windef.h:293
WPARAM wParam
Definition: combotst.c:138
#define TB_GETITEMRECT
Definition: commctrl.h:1105
bool fGoButtonShown
Definition: addressband.h:43
void CreateGoButton()
#define MAKELONG(a, b)
Definition: typedefs.h:248
smooth NULL
Definition: ftsmooth.c:416
#define DefWindowProc
Definition: ros2win.h:31
#define WM_SIZE
Definition: winuser.h:1593
#define SWP_NOACTIVATE
Definition: winuser.h:1227
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HWND fGoButton
Definition: addressband.h:41
#define SWP_SHOWWINDOW
Definition: winuser.h:1233
#define SendMessage
Definition: winuser.h:5744
#define HIWORD(l)
Definition: typedefs.h:246
LONG bottom
Definition: windef.h:294
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234

◆ OnTipText()

LRESULT CAddressBand::OnTipText ( UINT  idControl,
NMHDR notifyHeader,
BOOL bHandled 
)

Definition at line 414 of file addressband.cpp.

415 {
416  if (notifyHeader->hwndFrom == fGoButton)
417  {
419  WCHAR szFormat[MAX_PATH];
420  LPNMTBGETINFOTIP pGIT = (LPNMTBGETINFOTIP)notifyHeader;
421 
423  {
424  LoadStringW(_AtlBaseModule.GetResourceInstance(), IDS_GOBUTTONTIPTEMPLATE, szFormat, _countof(szFormat));
425  wnsprintf(pGIT->pszText, pGIT->cchTextMax, szFormat, szText);
426  }
427  else
428  *pGIT->pszText = 0;
429  }
430  return 0;
431 }
#define _countof(array)
Definition: fontsub.cpp:30
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
HWND fEditControl
Definition: addressband.h:40
#define LPNMTBGETINFOTIP
Definition: commctrl.h:1366
#define wnsprintf
Definition: shlwapi.h:1701
static const WCHAR szText[]
Definition: dialog.c:139
#define IDS_GOBUTTONTIPTEMPLATE
Definition: resource.h:120
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define MAX_PATH
Definition: compat.h:26
HWND fGoButton
Definition: addressband.h:41
HWND hwndFrom
Definition: winuser.h:3131
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1408

◆ OnWindowPosChanging()

LRESULT CAddressBand::OnWindowPosChanging ( UINT  uMsg,
WPARAM  wParam,
LPARAM  lParam,
BOOL bHandled 
)

Definition at line 501 of file addressband.cpp.

502 {
503  RECT goButtonBounds;
504  RECT buttonBounds;
505  long buttonWidth;
506  long buttonHeight;
507  RECT comboBoxBounds;
508  WINDOWPOS positionInfoCopy;
509  long newHeight;
510  long newWidth;
511 
512  if (!fGoButtonShown)
513  {
514  bHandled = FALSE;
515  return 0;
516  }
517 
518  if (!fGoButton)
519  CreateGoButton();
520 
521  positionInfoCopy = *reinterpret_cast<WINDOWPOS *>(lParam);
522  newHeight = positionInfoCopy.cy;
523  newWidth = positionInfoCopy.cx;
524 
525  SendMessage(fGoButton, TB_GETITEMRECT, 0, reinterpret_cast<LPARAM>(&buttonBounds));
526 
527  buttonWidth = buttonBounds.right - buttonBounds.left;
528  buttonHeight = buttonBounds.bottom - buttonBounds.top;
529  positionInfoCopy.cx = newWidth - 2 - buttonWidth;
530  DefWindowProc(WM_WINDOWPOSCHANGING, wParam, reinterpret_cast<LPARAM>(&positionInfoCopy));
531  ::GetWindowRect(fComboBox, &comboBoxBounds);
532  ::SetWindowPos(fGoButton, NULL, newWidth - buttonWidth, (comboBoxBounds.bottom - comboBoxBounds.top - buttonHeight) / 2,
533  buttonWidth, buttonHeight, SWP_NOOWNERZORDER | SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER);
534 
535  goButtonBounds.left = newWidth - buttonWidth;
536  goButtonBounds.top = 0;
537  goButtonBounds.right = newWidth - buttonWidth;
538  goButtonBounds.bottom = newHeight;
539  InvalidateRect(&goButtonBounds, TRUE);
540 
542  return 0;
543 }
#define TRUE
Definition: types.h:120
#define CB_SETDROPPEDWIDTH
Definition: winuser.h:1944
HWND fComboBox
Definition: addressband.h:42
LONG top
Definition: windef.h:292
LONG left
Definition: windef.h:291
#define SWP_NOZORDER
Definition: winuser.h:1232
LONG right
Definition: windef.h:293
WPARAM wParam
Definition: combotst.c:138
#define TB_GETITEMRECT
Definition: commctrl.h:1105
bool fGoButtonShown
Definition: addressband.h:43
void CreateGoButton()
smooth NULL
Definition: ftsmooth.c:416
#define DefWindowProc
Definition: ros2win.h:31
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
HWND fGoButton
Definition: addressband.h:41
#define SWP_SHOWWINDOW
Definition: winuser.h:1233
#define SendMessage
Definition: winuser.h:5744
LONG bottom
Definition: windef.h:294
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
LPARAM lParam
Definition: combotst.c:139
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234

◆ OnWinEvent()

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

Definition at line 293 of file addressband.cpp.

295 {
296  CComPtr<IWinEventHandler> winEventHandler;
297  HRESULT hResult;
298  RECT rect;
299 
300  if (theResult)
301  *theResult = 0;
302 
303  switch (uMsg)
304  {
305  case WM_WININICHANGE:
306  break;
307  case WM_COMMAND:
309  {
310  fGoButtonShown = !SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton", FALSE, TRUE);
311  SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton", REG_SZ, fGoButtonShown ? (LPVOID)L"yes" : (LPVOID)L"no", fGoButtonShown ? 8 : 6, SHREGSET_FORCE_HKCU);
312  if (!fGoButton)
313  CreateGoButton();
316  SendMessage(m_hWnd,WM_SIZE,0,MAKELPARAM(rect.right-rect.left,rect.bottom-rect.top));
317  // broadcast change notification to all explorer windows
318  }
319  break;
320  }
321  hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IWinEventHandler, &winEventHandler));
322  if (FAILED_UNEXPECTEDLY(hResult))
323  return hResult;
324  return winEventHandler->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult);
325 }
#define TRUE
Definition: types.h:120
LONG WINAPI SHRegSetUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwType, LPVOID pvData, DWORD cbData, DWORD dwFlags)
Definition: reg.c:673
#define SW_HIDE
Definition: winuser.h:762
#define MAKELPARAM(l, h)
Definition: winuser.h:3947
BOOL WINAPI SHRegGetBoolUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, BOOL fIgnoreHKCU, BOOL fDefault)
Definition: reg.c:770
HWND hWnd
Definition: settings.c:17
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define IID_PPV_ARG(Itype, ppType)
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
bool fGoButtonShown
Definition: addressband.h:43
void CreateGoButton()
#define IDM_TOOLBARS_GOBUTTON
Definition: resource.h:36
#define WM_WININICHANGE
Definition: winuser.h:1612
#define SW_SHOW
Definition: winuser.h:769
#define SHREGSET_FORCE_HKCU
Definition: shlwapi.h:312
#define WM_SIZE
Definition: winuser.h:1593
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
static const WCHAR L[]
Definition: oid.c:1250
HWND fGoButton
Definition: addressband.h:41
#define WM_COMMAND
Definition: winuser.h:1722
#define SendMessage
Definition: winuser.h:5744
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
CComPtr< IAddressEditBox > fAddressEditBox
Definition: addressband.h:39
LPARAM lParam
Definition: combotst.c:139
#define REG_SZ
Definition: layer.c:22

◆ QueryService()

HRESULT STDMETHODCALLTYPE CAddressBand::QueryService ( REFGUID  guidService,
REFIID  riid,
void **  ppvObject 
)
virtual

Implements IServiceProvider.

Definition at line 364 of file addressband.cpp.

365 {
366  return E_NOTIMPL;
367 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ QueryStatus()

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

Implements IOleCommandTarget.

Definition at line 242 of file addressband.cpp.

244 {
245  return IUnknown_QueryStatus(fAddressEditBox, *pguidCmdGroup, cCmds, prgCmds, pCmdText);
246 }
HRESULT WINAPI IUnknown_QueryStatus(IUnknown *lpUnknown, REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
Definition: ordinal.c:995
CComPtr< IAddressEditBox > fAddressEditBox
Definition: addressband.h:39

◆ Refresh()

HRESULT STDMETHODCALLTYPE CAddressBand::Refresh ( long  param8)
virtual

Definition at line 353 of file addressband.cpp.

354 {
355  CComPtr<IAddressBand> addressBand;
356  HRESULT hResult;
357 
358  hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IAddressBand, &addressBand));
359  if (FAILED_UNEXPECTEDLY(hResult))
360  return hResult;
361  return addressBand->Refresh(param8);
362 }
#define IID_PPV_ARG(Itype, ppType)
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
CComPtr< IAddressEditBox > fAddressEditBox
Definition: addressband.h:39

◆ ResizeBorderDW()

HRESULT STDMETHODCALLTYPE CAddressBand::ResizeBorderDW ( const RECT prcBorder,
IUnknown punkToolbarSite,
BOOL  fReserved 
)
virtual

Definition at line 224 of file addressband.cpp.

226 {
227  return E_NOTIMPL;
228 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ Save()

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

Implements IPersistStream.

Definition at line 393 of file addressband.cpp.

394 {
395  // incomplete
396  return E_NOTIMPL;
397 }
#define E_NOTIMPL
Definition: ddrawi.h:99

◆ SetSite()

HRESULT STDMETHODCALLTYPE CAddressBand::SetSite ( IUnknown pUnkSite)
virtual

Implements IObjectWithSite.

Definition at line 107 of file addressband.cpp.

108 {
109  CComPtr<IShellService> shellService;
110  HWND parentWindow;
111  HWND combobox;
112  HRESULT hResult;
113  IImageList *piml;
114 
115  if (pUnkSite == NULL)
116  {
117  fSite.Release();
118  return S_OK;
119  }
120 
121  fSite.Release();
122 
123  hResult = pUnkSite->QueryInterface(IID_PPV_ARG(IDockingWindowSite, &fSite));
124  if (FAILED_UNEXPECTEDLY(hResult))
125  return hResult;
126 
127  // get window handle of parent
128  parentWindow = NULL;
129  hResult = IUnknown_GetWindow(fSite, &parentWindow);
130 
131  if (!::IsWindow(parentWindow))
132  return E_FAIL;
133 
134  // create combo box ex
137  0, 0, 500, 250, parentWindow, (HMENU)IDM_TOOLBARS_ADDRESSBAR, _AtlBaseModule.GetModuleInstance(), 0);
138  if (combobox == NULL)
139  return E_FAIL;
140  SubclassWindow(combobox);
141 
143  if (FAILED_UNEXPECTEDLY(hr))
144  {
145  SendMessageW(combobox, CBEM_SETIMAGELIST, 0, 0);
146  }
147  else
148  {
149  SendMessageW(combobox, CBEM_SETIMAGELIST, 0, reinterpret_cast<LPARAM>(piml));
150  }
151 
154 
155  fEditControl = reinterpret_cast<HWND>(SendMessage(CBEM_GETEDITCONTROL, 0, 0));
156  fComboBox = reinterpret_cast<HWND>(SendMessage(CBEM_GETCOMBOCONTROL, 0, 0));
157  hResult = CAddressEditBox_CreateInstance(IID_PPV_ARG(IAddressEditBox, &fAddressEditBox));
158  if (FAILED_UNEXPECTEDLY(hResult))
159  return hResult;
160 
161  hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IShellService, &shellService));
162  if (FAILED_UNEXPECTEDLY(hResult))
163  return hResult;
164  hResult = fAddressEditBox->Init(combobox, fEditControl, 8, fSite /*(IAddressBand *)this*/);
165  if (FAILED_UNEXPECTEDLY(hResult))
166  return hResult;
167  hResult = shellService->SetOwner(fSite);
168  if (FAILED_UNEXPECTEDLY(hResult))
169  return hResult;
170 
171  fGoButtonShown = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton", FALSE, TRUE);
172  if (fGoButtonShown)
173  CreateGoButton();
174 
175  return hResult;
176 }
#define CBS_OWNERDRAWFIXED
Definition: winuser.h:289
#define IDM_TOOLBARS_ADDRESSBAR
Definition: resource.h:31
#define TRUE
Definition: types.h:120
HRESULT hr
Definition: shlfolder.c:183
BOOL WINAPI IsWindow(_In_opt_ HWND)
HRESULT CAddressEditBox_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:33
CComPtr< IDockingWindowSite > fSite
Definition: addressband.h:38
BOOL WINAPI SHRegGetBoolUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, BOOL fIgnoreHKCU, BOOL fDefault)
Definition: reg.c:770
HWND fComboBox
Definition: addressband.h:42
#define WS_CHILD
Definition: pedump.c:617
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#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
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
HWND fEditControl
Definition: addressband.h:40
bool fGoButtonShown
Definition: addressband.h:43
#define CCS_NODIVIDER
Definition: commctrl.h:2220
void CreateGoButton()
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:517
HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv)
Definition: shellord.c:2013
#define CreateWindowEx
Definition: winuser.h:5656
smooth NULL
Definition: ftsmooth.c:416
#define CBEM_GETEDITCONTROL
Definition: commctrl.h:3805
#define CBEM_SETIMAGELIST
Definition: commctrl.h:3799
LONG HRESULT
Definition: typedefs.h:77
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define CBEM_SETEXTENDEDSTYLE
Definition: commctrl.h:3807
#define CBES_EX_NOSIZELIMIT
Definition: commctrl.h:3826
static const WCHAR L[]
Definition: oid.c:1250
#define WS_TABSTOP
Definition: pedump.c:634
#define S_OK
Definition: intsafe.h:59
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
void Release()
Definition: atlcomcli.h:140
#define CBEM_GETCOMBOCONTROL
Definition: commctrl.h:3804
#define WC_COMBOBOXEXW
Definition: commctrl.h:3753
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define SendMessage
Definition: winuser.h:5744
#define CCS_NOMOVEY
Definition: commctrl.h:2215
#define SHIL_SMALL
Definition: shellapi.h:183
#define CBES_EX_CASESENSITIVE
Definition: commctrl.h:3827
CComPtr< IAddressEditBox > fAddressEditBox
Definition: addressband.h:39
#define WS_VISIBLE
Definition: pedump.c:620
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60

◆ ShowDW()

HRESULT STDMETHODCALLTYPE CAddressBand::ShowDW ( BOOL  fShow)
virtual

Implements IDockingWindow.

Definition at line 230 of file addressband.cpp.

231 {
232  if (m_hWnd)
233  {
234  if (fShow)
236  else
238  }
239  return S_OK;
240 }
#define SW_HIDE
Definition: winuser.h:762
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define SW_SHOW
Definition: winuser.h:769
#define S_OK
Definition: intsafe.h:59

Referenced by CloseDW().

◆ TranslateAcceleratorIO()

HRESULT STDMETHODCALLTYPE CAddressBand::TranslateAcceleratorIO ( LPMSG  lpMsg)
virtual

Definition at line 262 of file addressband.cpp.

263 {
264  if (lpMsg->hwnd == fEditControl)
265  {
266  switch (lpMsg->message)
267  {
268  case WM_SYSKEYDOWN:
269  case WM_SYSKEYUP:
270  case WM_SYSCOMMAND:
271  case WM_SYSDEADCHAR:
272  case WM_SYSCHAR:
273  return S_FALSE;
274  }
275 
276  TranslateMessage(lpMsg);
277  DispatchMessage(lpMsg);
278  return S_OK;
279  }
280  return S_FALSE;
281 }
#define DispatchMessage
Definition: winuser.h:5666
BOOL WINAPI TranslateMessage(_In_ const MSG *)
HWND fEditControl
Definition: addressband.h:40
#define WM_SYSCHAR
Definition: winuser.h:1703
#define S_FALSE
Definition: winerror.h:2357
#define S_OK
Definition: intsafe.h:59
#define WM_SYSDEADCHAR
Definition: winuser.h:1704
#define WM_SYSKEYUP
Definition: winuser.h:1702
HWND hwnd
Definition: winuser.h:3088
#define WM_SYSKEYDOWN
Definition: winuser.h:1701
UINT message
Definition: winuser.h:3089
#define WM_SYSCOMMAND
Definition: winuser.h:1723

◆ UIActivateIO()

HRESULT STDMETHODCALLTYPE CAddressBand::UIActivateIO ( BOOL  fActivate,
LPMSG  lpMsg 
)
virtual

Definition at line 283 of file addressband.cpp.

284 {
285  if (fActivate)
286  {
287  IUnknown_OnFocusChangeIS(fSite, static_cast<IDeskBand *>(this), fActivate);
288  SetFocus();
289  }
290  return S_OK;
291 }
HRESULT WINAPI IUnknown_OnFocusChangeIS(LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
Definition: ordinal.c:4594
CComPtr< IDockingWindowSite > fSite
Definition: addressband.h:38
HWND WINAPI SetFocus(_In_opt_ HWND)
#define S_OK
Definition: intsafe.h:59

Member Data Documentation

◆ fAddressEditBox

CComPtr<IAddressEditBox> CAddressBand::fAddressEditBox
private

◆ fComboBox

HWND CAddressBand::fComboBox
private

Definition at line 42 of file addressband.h.

Referenced by CAddressBand(), OnSize(), OnWindowPosChanging(), and SetSite().

◆ fEditControl

HWND CAddressBand::fEditControl
private

Definition at line 40 of file addressband.h.

Referenced by CAddressBand(), HasFocusIO(), OnTipText(), SetSite(), and TranslateAcceleratorIO().

◆ fGoButton

HWND CAddressBand::fGoButton
private

◆ fGoButtonShown

bool CAddressBand::fGoButtonShown
private

◆ fSite

CComPtr<IDockingWindowSite> CAddressBand::fSite
private

Definition at line 38 of file addressband.h.

Referenced by CloseDW(), FocusChange(), GetSite(), SetSite(), and UIActivateIO().

◆ m_himlHot

HIMAGELIST CAddressBand::m_himlHot
private

Definition at line 45 of file addressband.h.

Referenced by CloseDW(), and CreateGoButton().

◆ m_himlNormal

HIMAGELIST CAddressBand::m_himlNormal
private

Definition at line 44 of file addressband.h.

Referenced by CloseDW(), and CreateGoButton().


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