ReactOS  0.4.14-dev-49-gfb4591c
addressband.cpp
Go to the documentation of this file.
1 /*
2  * ReactOS Explorer
3  *
4  * Copyright 2009 Andrew Hill <ash77 at domain reactos.org>
5  *
6  * This library is free software; you can redistribute it and/or
7  * modify it under the terms of the GNU Lesser General Public
8  * License as published by the Free Software Foundation; either
9  * version 2.1 of the License, or (at your option) any later version.
10  *
11  * This library is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
14  * Lesser General Public License for more details.
15  *
16  * You should have received a copy of the GNU Lesser General Public
17  * License along with this library; if not, write to the Free Software
18  * Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
19  */
20 
21 /*
22 Implements the navigation band of the cabinet window
23 */
24 
25 #include "precomp.h"
26 #include <commoncontrols.h>
27 #include <shlwapi_undoc.h>
28 #include <shellapi.h>
29 
30 /*
31 TODO:
32 ****Add tooltip notify handler
33  **Properly implement GetBandInfo
34  Implement Exec
35  Implement QueryService
36  Implement Load
37  Implement Save
38 */
39 
41 {
43  fGoButton = NULL;
44  fComboBox = NULL;
45  fGoButtonShown = false;
46 }
47 
49 {
50 }
51 
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 }
64 
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 }
106 
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 }
177 
179 {
180  if (fSite == NULL)
181  return E_FAIL;
182  return fSite->QueryInterface(riid, ppvSite);
183 }
184 
186 {
187  if (lphwnd == NULL)
188  return E_POINTER;
189  *lphwnd = m_hWnd;
190  return S_OK;
191 }
192 
194 {
195  return E_NOTIMPL;
196 }
197 
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 }
223 
225  const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
226 {
227  return E_NOTIMPL;
228 }
229 
231 {
232  if (m_hWnd)
233  {
234  if (fShow)
236  else
238  }
239  return S_OK;
240 }
241 
243  const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText)
244 {
245  return IUnknown_QueryStatus(fAddressEditBox, *pguidCmdGroup, cCmds, prgCmds, pCmdText);
246 }
247 
249  DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
250 {
251  // incomplete
252  return E_NOTIMPL;
253 }
254 
256 {
258  return S_OK;
259  return S_FALSE;
260 }
261 
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 }
282 
284 {
285  if (fActivate)
286  {
287  IUnknown_OnFocusChangeIS(fSite, static_cast<IDeskBand *>(this), fActivate);
288  SetFocus();
289  }
290  return S_OK;
291 }
292 
294  HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
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 }
326 
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 }
341 
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 }
352 
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 }
363 
365 {
366  return E_NOTIMPL;
367 }
368 
370 {
371  return E_NOTIMPL;
372 }
373 
375 {
376  if (pClassID == NULL)
377  return E_POINTER;
378  *pClassID = CLSID_SH_AddressBand;
379  return S_OK;
380 }
381 
383 {
384  return E_NOTIMPL;
385 }
386 
388 {
389  // incomplete
390  return E_NOTIMPL;
391 }
392 
394 {
395  // incomplete
396  return E_NOTIMPL;
397 }
398 
400 {
401  // incomplete
402  return E_NOTIMPL;
403 }
404 
406 {
407  if (notifyHeader->hwndFrom == fGoButton)
408  {
409  fAddressEditBox->Execute(0);
410  }
411  return 0;
412 }
413 
414 LRESULT CAddressBand::OnTipText(UINT idControl, NMHDR *notifyHeader, BOOL &bHandled)
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 }
432 
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 }
459 
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 }
500 
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 }
544 
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 }
DBIM_BKCOLOR struct tagDESKBANDINFO DESKBANDINFO
#define CBS_OWNERDRAWFIXED
Definition: winuser.h:289
LRESULT OnNotifyClick(WPARAM wParam, NMHDR *notifyHeader, BOOL &bHandled)
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
virtual HRESULT STDMETHODCALLTYPE IsDirty()
#define IDM_TOOLBARS_ADDRESSBAR
Definition: resource.h:31
virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite)
BOOL WINAPI OffsetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
Definition: coord.c:900
#define TB_SETHOTIMAGELIST
Definition: commctrl.h:1126
#define MAKEINTRESOURCE
Definition: winuser.h:591
#define DispatchMessage
Definition: winuser.h:5666
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define TB_BUTTONSTRUCTSIZE
Definition: commctrl.h:1106
#define REFIID
Definition: guiddef.h:118
#define TRUE
Definition: types.h:120
LRESULT OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
virtual HRESULT STDMETHODCALLTYPE GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi)
Definition: addressband.cpp:65
LONG WINAPI SHRegSetUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwType, LPVOID pvData, DWORD cbData, DWORD dwFlags)
Definition: reg.c:673
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define CB_GETDROPPEDSTATE
Definition: winuser.h:1927
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)
virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID)
HRESULT hr
Definition: shlfolder.c:183
Definition: scsiwmi.h:51
BOOL WINAPI IsWindow(_In_opt_ HWND)
long x
Definition: polytest.cpp:48
virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus)
#define CB_SETDROPPEDWIDTH
Definition: winuser.h:1944
#define pt(x, y)
Definition: drawing.c:79
#define SW_HIDE
Definition: winuser.h:762
REFIID riid
Definition: precomp.h:44
#define TB_ADDSTRINGW
Definition: commctrl.h:1104
HRESULT CAddressEditBox_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:33
#define _countof(array)
Definition: fontsub.cpp:30
virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd)
HRESULT WINAPI IUnknown_OnFocusChangeIS(LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
Definition: ordinal.c:4594
CComPtr< IDockingWindowSite > fSite
Definition: addressband.h:38
#define MAKELPARAM(l, h)
Definition: winuser.h:3947
BOOL WINAPI SHRegGetBoolUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, BOOL fIgnoreHKCU, BOOL fDefault)
Definition: reg.c:770
HWND fComboBox
Definition: addressband.h:42
HWND hWnd
Definition: settings.c:17
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:915
LONG top
Definition: windef.h:292
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
DWORD WINAPI GetLastError(VOID)
Definition: except.c:1059
HWND WINAPI SetFocus(_In_opt_ HWND)
UINT_PTR WPARAM
Definition: windef.h:207
#define WS_CHILD
Definition: pedump.c:617
LONG left
Definition: windef.h:291
#define SWP_NOZORDER
Definition: winuser.h:1232
virtual HRESULT STDMETHODCALLTYPE HasFocusIO()
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
#define WS_CLIPCHILDREN
Definition: pedump.c:619
LONG right
Definition: windef.h:293
#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
virtual ~CAddressBand()
Definition: addressband.cpp:48
BOOL WINAPI DestroyWindow(_In_ HWND)
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
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
& rect
Definition: startmenu.cpp:1413
WPARAM wParam
Definition: combotst.c:138
#define LPNMTBGETINFOTIP
Definition: commctrl.h:1366
#define TB_GETITEMRECT
Definition: commctrl.h:1105
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
bool fGoButtonShown
Definition: addressband.h:43
#define TB_SETMAXTEXTROWS
Definition: commctrl.h:1134
#define CCS_NODIVIDER
Definition: commctrl.h:2220
HIMAGELIST m_himlHot
Definition: addressband.h:45
#define wnsprintf
Definition: shlwapi.h:1701
virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize)
void CreateGoButton()
static const WCHAR szText[]
Definition: dialog.c:139
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
unsigned int BOOL
Definition: ntddk_ex.h:94
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:517
virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow)
HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv)
Definition: shellord.c:2013
#define IDS_GOBUTTONTIPTEMPLATE
Definition: resource.h:120
#define WM_SYSCHAR
Definition: winuser.h:1703
#define CreateWindowEx
Definition: winuser.h:5656
#define S_FALSE
Definition: winerror.h:2357
#define MAKELONG(a, b)
Definition: typedefs.h:248
#define IDM_TOOLBARS_GOBUTTON
Definition: resource.h:36
virtual HRESULT STDMETHODCALLTYPE Refresh(long param8)
smooth NULL
Definition: ftsmooth.c:416
#define WM_WININICHANGE
Definition: winuser.h:1612
LONG_PTR LPARAM
Definition: windef.h:208
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2218
virtual HRESULT STDMETHODCALLTYPE FileSysChange(long param8, long paramC)
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode)
#define CBEM_GETEDITCONTROL
Definition: commctrl.h:3805
#define SW_SHOW
Definition: winuser.h:769
#define DefWindowProc
Definition: ros2win.h:31
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm)
#define TB_SETIMAGELIST
Definition: commctrl.h:1122
#define IDS_ADDRESSBANDLABEL
Definition: resource.h:123
#define SHREGSET_FORCE_HKCU
Definition: shlwapi.h:312
HRESULT hres
Definition: protocol.c:465
virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty)
#define CBEM_SETIMAGELIST
Definition: commctrl.h:3799
__wchar_t WCHAR
Definition: xmlstorage.h:180
#define WM_SIZE
Definition: winuser.h:1593
LONG HRESULT
Definition: typedefs.h:77
#define SWP_NOACTIVATE
Definition: winuser.h:1227
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1643
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:71
#define RGB(r, g, b)
Definition: wingdi.h:2935
#define MAX_PATH
Definition: compat.h:26
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
unsigned long DWORD
Definition: ntddk_ex.h:95
#define TBSTYLE_TOOLTIPS
Definition: commctrl.h:961
#define IDS_GOBUTTONLABEL
Definition: resource.h:119
#define CBEM_SETEXTENDEDSTYLE
Definition: commctrl.h:3807
#define CCS_NORESIZE
Definition: commctrl.h:2217
#define CBES_EX_NOSIZELIMIT
Definition: commctrl.h:3826
static const WCHAR L[]
Definition: oid.c:1250
#define TB_ADDBUTTONSW
Definition: commctrl.h:1238
virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite)
HWND fGoButton
Definition: addressband.h:41
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define WS_TABSTOP
Definition: pedump.c:634
#define WM_COMMAND
Definition: winuser.h:1722
HWND hwndFrom
Definition: winuser.h:3131
#define IDB_GOBUTTON_HOT
Definition: undocshell.h:626
HIMAGELIST m_himlNormal
Definition: addressband.h:44
void FocusChange(BOOL bFocus)
Definition: addressband.cpp:52
HWND WINAPI GetParent(_In_ HWND)
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg)
#define S_OK
Definition: intsafe.h:59
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1408
#define WM_SYSDEADCHAR
Definition: winuser.h:1704
#define WM_SYSKEYUP
Definition: winuser.h:1702
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
void Release()
Definition: atlcomcli.h:140
#define E_NOTIMPL
Definition: ddrawi.h:99
#define LR_CREATEDIBSECTION
Definition: winuser.h:1088
#define CBEM_GETCOMBOCONTROL
Definition: commctrl.h:3804
virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg)
#define WC_COMBOBOXEXW
Definition: commctrl.h:3753
unsigned int UINT
Definition: ndis.h:50
#define IMAGE_BITMAP
Definition: winuser.h:211
#define SWP_SHOWWINDOW
Definition: winuser.h:1233
LRESULT OnWindowPosChanging(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
HWND hwnd
Definition: winuser.h:3088
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
Definition: imagelist.c:2208
HWND WINAPI GetFocus(void)
Definition: window.c:1905
#define SendMessage
Definition: winuser.h:5744
#define TBSTATE_ENABLED
Definition: commctrl.h:946
#define CCS_NOMOVEY
Definition: commctrl.h:2215
#define WM_SYSKEYDOWN
Definition: winuser.h:1701
#define HIWORD(l)
Definition: typedefs.h:246
unsigned int ULONG
Definition: retypes.h:1
BOOL WINAPI SetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
Definition: coord.c:532
LONG bottom
Definition: windef.h:294
virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
HRESULT WINAPI IUnknown_QueryStatus(IUnknown *lpUnknown, REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
Definition: ordinal.c:995
#define IDB_GOBUTTON_NORMAL
Definition: undocshell.h:625
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define SHIL_SMALL
Definition: shellapi.h:183
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_ERASEBKGND
Definition: winuser.h:1607
#define CBES_EX_CASESENSITIVE
Definition: commctrl.h:3827
LONG_PTR LRESULT
Definition: windef.h:209
#define E_POINTER
Definition: winerror.h:2365
CComPtr< IAddressEditBox > fAddressEditBox
Definition: addressband.h:39
UINT message
Definition: winuser.h:3089
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
#define WS_VISIBLE
Definition: pedump.c:620
GLuint64EXT * result
Definition: glext.h:11304
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
#define WM_SYSCOMMAND
Definition: winuser.h:1723
#define TBSTYLE_LIST
Definition: commctrl.h:965
LPARAM lParam
Definition: combotst.c:139
#define LOWORD(l)
Definition: pedump.c:82
#define TBSTYLE_FLAT
Definition: commctrl.h:964
LRESULT OnTipText(UINT idControl, NMHDR *notifyHeader, BOOL &bHandled)
#define SUCCEEDED(hr)
Definition: intsafe.h:57
virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved)
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234
#define REG_SZ
Definition: layer.c:22