ReactOS  0.4.13-dev-464-g6b95727
internettoolbar.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 a class that knows how to hold and manage the menu band, brand band,
23 toolbar, and address band for an explorer window
24 */
25 
26 #include "precomp.h"
27 
28 #if 1
29 
30 interface IAugmentedShellFolder : public IShellFolder
31 {
36 };
37 
38 #endif
39 
40 // navigation controls and menubar just send a message to parent window
41 /*
42 TODO:
43 ****Implement BandProxy methods
44 ****Add QueryStatus handler for built-in bands
45 ****Enable/Disable up, search, and folders commands appropriately
46  **Why are explorer toolbar separators a nonstandard width?
47  **Remove "(Empty)" item from Favorites menu. Probably something missing in CMenuCallback::CallbackSM
48  **Chevron menu on menuband doesn't work
49  **Fix CInternetToolbar::QueryBand to be generic
50 
51 ****Fix context menu to strip divider when menu shown for menu band
52 ****Fix context menu to have items checked appropriately
53 ****Implement -1 command id update
54 ****When bands are rearranged, resize the internet toolbar and fix height of brand band
55 ****Right clicking on the browse back and forward toolbar buttons displays the same as pulldown menus
56  Implement show/hide of bands
57  Why is the background color of my toolbars different from explorer?
58  Internet Toolbar command handler should get the target for the command and call Exec on the target.
59  For commands built in to the Internet Toolbar, its Exec handles the command
60  When window width is changed, brand band flashes badly
61  Add all bands with correct ids (system bands now add with correct ids)
62  Implement IBandSite
63  Implement remaining IExplorerToolbar methods
64  Fix toolbar buttons to enable/disable correctly
65  After toolbar is customized, it may be necessary to patch the widths of separators
66  Add theme support
67  Check sizes and spacing of toolbars against Explorer
68  Implement resizing of the dock bar
69  Add missing icons for toolbar items
70  Draw History item in forward/back dropdown menus with icon
71  Fix toolbar customize dialog to not include separators as possible selections
72  Implement save/restore of toolbar state
73  Refactor drop down menu code to use a common function since code is so similar
74 */
75 
77 
79 {
80  CComPtr<IWinEventHandler> menuWinEventHandler;
81  HRESULT hResult = punk->QueryInterface(IID_PPV_ARG(IWinEventHandler, &menuWinEventHandler));
82  if (FAILED_UNEXPECTEDLY(hResult))
83  return hResult;
84  hResult = menuWinEventHandler->IsWindowOwner(hWnd);
85  if (FAILED_UNEXPECTEDLY(hResult))
86  return hResult;
87  if (hResult == S_OK)
88  return menuWinEventHandler->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult);
89  return S_FALSE;
90 }
91 
93 {
94  CComPtr<IDockingWindow> dockingWindow;
95  HRESULT hResult = punk->QueryInterface(IID_PPV_ARG(IDockingWindow, &dockingWindow));
96  if (FAILED_UNEXPECTEDLY(hResult))
97  return hResult;
98  hResult = dockingWindow->ShowDW(fShow);
99  if (FAILED_UNEXPECTEDLY(hResult))
100  return hResult;
101  return S_OK;
102 }
103 
105 {
106  CComPtr<IDockingWindow> dockingWindow;
107  HRESULT hResult = punk->QueryInterface(IID_PPV_ARG(IDockingWindow, &dockingWindow));
108  if (FAILED_UNEXPECTEDLY(hResult))
109  return hResult;
110  hResult = dockingWindow->CloseDW(dwReserved);
111  if (FAILED_UNEXPECTEDLY(hResult))
112  return hResult;
113  return S_OK;
114 }
115 
116 class CInternetToolbar;
117 
118 class CDockSite :
119  public CComObjectRootEx<CComMultiThreadModelNoCS>,
120  public IDockingWindowSite,
121  public IInputObjectSite,
122  public IOleCommandTarget,
123  public IServiceProvider
124 {
125 public:
126  enum {
132  };
133 private:
134  CComPtr<IUnknown> fContainedBand; // the band inside us
135  CInternetToolbar *fToolbar; // our browser
138  int fBandID;
139 public:
140  int fFlags;
141 private:
143  // fields of DESKBANDINFO must be preserved between calls to GetBandInfo
145 public:
146  CDockSite();
147  ~CDockSite();
148  HRESULT Initialize(IUnknown *containedBand, CInternetToolbar *browser, HWND hwnd, int bandID, int flags);
150 private:
151 
152  // *** IOleWindow methods ***
153  virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd);
155 
156  // *** IDockingWindow methods ***
157  virtual HRESULT STDMETHODCALLTYPE GetBorderDW(IUnknown* punkObj, LPRECT prcBorder);
158  virtual HRESULT STDMETHODCALLTYPE RequestBorderSpaceDW(IUnknown* punkObj, LPCBORDERWIDTHS pbw);
159  virtual HRESULT STDMETHODCALLTYPE SetBorderSpaceDW(IUnknown* punkObj, LPCBORDERWIDTHS pbw);
160 
161  // *** IInputObjectSite specific methods ***
162  virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus);
163 
164  // *** IOleCommandTarget specific methods ***
165  virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds,
166  OLECMD prgCmds[ ], OLECMDTEXT *pCmdText);
167  virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID,
168  DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut);
169 
170  // *** IServiceProvider methods ***
171  virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject);
172 
175  COM_INTERFACE_ENTRY_IID(IID_IDockingWindowSite, IDockingWindowSite)
176  COM_INTERFACE_ENTRY_IID(IID_IInputObjectSite, IInputObjectSite)
177  COM_INTERFACE_ENTRY_IID(IID_IOleCommandTarget, IOleCommandTarget)
178  COM_INTERFACE_ENTRY_IID(IID_IServiceProvider, IServiceProvider)
179 END_COM_MAP()
180 };
181 
183 {
184  fToolbar = NULL;
185  fRebarWindow = NULL;
186  fChildWindow = NULL;
187  fBandID = 0;
188  fFlags = 0;
189  fInitialized = false;
190  memset(&fDeskBandInfo, 0, sizeof(fDeskBandInfo));
191 }
192 
194 {
195 }
196 
197 HRESULT CDockSite::Initialize(IUnknown *containedBand, CInternetToolbar *browser, HWND hwnd, int bandID, int flags)
198 {
199  TCHAR textBuffer[40];
201  HRESULT hResult;
202 
203  fContainedBand = containedBand;
204  fToolbar = browser;
205  fRebarWindow = hwnd;
206  fBandID = bandID;
207  fFlags = flags;
208  hResult = IUnknown_SetSite(containedBand, static_cast<IOleWindow *>(this));
209  if (FAILED_UNEXPECTEDLY(hResult))
210  return hResult;
211  hResult = IUnknown_GetWindow(containedBand, &fChildWindow);
212  if (FAILED_UNEXPECTEDLY(hResult))
213  return hResult;
214 
215  memset(&bandInfo, 0, sizeof(bandInfo));
216  bandInfo.cbSize = sizeof(bandInfo);
217  bandInfo.lpText = textBuffer;
218  bandInfo.cch = sizeof(textBuffer) / sizeof(TCHAR);
219  hResult = GetRBBandInfo(bandInfo);
220 
223  fInitialized = true;
224  return S_OK;
225 }
226 
228 {
229  CComPtr<IDeskBand> deskBand;
230  HRESULT hResult;
231 
232  hResult = fContainedBand->QueryInterface(IID_PPV_ARG(IDeskBand, &deskBand));
233  if (FAILED_UNEXPECTEDLY(hResult))
234  return hResult;
235 
236  fDeskBandInfo.dwMask = DBIM_BKCOLOR | DBIM_MODEFLAGS | DBIM_TITLE | DBIM_ACTUAL |
237  DBIM_INTEGRAL | DBIM_MAXSIZE | DBIM_MINSIZE;
238  hResult = deskBand->GetBandInfo(fBandID, 0, &fDeskBandInfo);
239  // result of call is ignored
240 
243 
244  bandInfo.fStyle = RBBS_FIXEDBMP;
245  if (fDeskBandInfo.dwModeFlags & DBIMF_VARIABLEHEIGHT)
246  bandInfo.fStyle |= RBBS_VARIABLEHEIGHT;
247  if (fDeskBandInfo.dwModeFlags & DBIMF_USECHEVRON)
248  bandInfo.fStyle |= RBBS_USECHEVRON;
249  if (fDeskBandInfo.dwModeFlags & DBIMF_BREAK)
250  bandInfo.fStyle |= RBBS_BREAK;
251  if (fDeskBandInfo.dwModeFlags & DBIMF_TOPALIGN)
252  bandInfo.fStyle |= RBBS_TOPALIGN;
254  bandInfo.fStyle |= RBBS_NOGRIPPER;
255  if (fFlags & ITF_NOTITLE)
256  bandInfo.fStyle |= RBBS_HIDETITLE;
258  bandInfo.fStyle |= RBBS_GRIPPERALWAYS;
259  if (fFlags & ITF_FIXEDSIZE)
260  bandInfo.fStyle |= RBBS_FIXEDSIZE;
261 
262  if (fDeskBandInfo.dwModeFlags & DBIMF_BKCOLOR)
263  {
264  bandInfo.fMask |= RBBIM_COLORS;
265  bandInfo.clrFore = CLR_DEFAULT;
266  bandInfo.clrBack = fDeskBandInfo.crBkgnd;
267  }
268  wcsncpy(bandInfo.lpText, fDeskBandInfo.wszTitle, bandInfo.cch);
269  bandInfo.hwndChild = fChildWindow;
270  bandInfo.cxMinChild = fDeskBandInfo.ptMinSize.x;
271  bandInfo.cyMinChild = fDeskBandInfo.ptMinSize.y;
272  bandInfo.wID = fBandID;
273  bandInfo.cyChild = fDeskBandInfo.ptActual.y;
274  bandInfo.cyMaxChild = fDeskBandInfo.ptMaxSize.y;
275  bandInfo.cyIntegral = fDeskBandInfo.ptIntegral.y;
276  bandInfo.cxIdeal = fDeskBandInfo.ptActual.x;
277  bandInfo.lParam = reinterpret_cast<LPARAM>(this);
278  return S_OK;
279 }
280 
282 {
283  if (lphwnd == NULL)
284  return E_POINTER;
285  *lphwnd = fRebarWindow;
286  return S_OK;
287 }
288 
290 {
291  return E_NOTIMPL;
292 }
293 
295 {
296  return E_NOTIMPL;
297 }
298 
300 {
301  return E_NOTIMPL;
302 }
303 
305 {
306  return E_NOTIMPL;
307 }
308 
310 {
311  return E_NOTIMPL;
312 }
313 
315  OLECMD prgCmds[ ], OLECMDTEXT *pCmdText)
316 {
317  return E_NOTIMPL;
318 }
319 
320 HRESULT STDMETHODCALLTYPE CDockSite::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt,
321  VARIANT *pvaIn, VARIANT *pvaOut)
322 {
323  TCHAR textBuffer[40];
325  int index;
326  HRESULT hResult;
327 
328  if (IsEqualIID(*pguidCmdGroup, CGID_DeskBand))
329  {
330  switch (nCmdID)
331  {
333  if (fInitialized == false)
334  return S_OK;
335  if (V_VT(pvaIn) != VT_I4)
336  return E_INVALIDARG;
337  if (V_I4(pvaIn) != fBandID)
338  return E_FAIL;
339  // deskband information changed
340  // call GetBandInfo and refresh information in rebar
341  memset(&bandInfo, 0, sizeof(bandInfo));
342  bandInfo.cbSize = sizeof(bandInfo);
343  bandInfo.lpText = textBuffer;
344  bandInfo.cch = sizeof(textBuffer) / sizeof(TCHAR);
345  hResult = GetRBBandInfo(bandInfo);
346  if (FAILED_UNEXPECTEDLY(hResult))
347  return hResult;
350  return S_OK;
351  }
352  }
353  return E_FAIL;
354 }
355 
357 {
358  if (IsEqualIID(guidService, SID_SMenuBandParent))
359  return this->QueryInterface(riid, ppvObject);
360 
361  return fToolbar->QueryService(guidService, riid, ppvObject);
362 }
363 
365 {
366 }
367 
369 {
370 }
371 
372 static HRESULT BindToDesktop(LPCITEMIDLIST pidl, IShellFolder ** ppsfResult)
373 {
374  HRESULT hr;
375  CComPtr<IShellFolder> psfDesktop;
376 
377  *ppsfResult = NULL;
378 
379  hr = SHGetDesktopFolder(&psfDesktop);
380  if (FAILED(hr))
381  return hr;
382 
383  hr = psfDesktop->BindToObject(pidl, NULL, IID_PPV_ARG(IShellFolder, ppsfResult));
384 
385  return hr;
386 }
387 
388 static HRESULT GetFavoritesFolder(IShellFolder ** ppsfFavorites, LPITEMIDLIST * ppidl)
389 {
390  HRESULT hr;
391  LPITEMIDLIST pidlUserFavorites;
392  LPITEMIDLIST pidlCommonFavorites;
393  CComPtr<IShellFolder> psfUserFavorites;
394  CComPtr<IShellFolder> psfCommonFavorites;
396 
397  if (ppsfFavorites)
398  *ppsfFavorites = NULL;
399 
400  if (ppidl)
401  *ppidl = NULL;
402 
403  hr = SHGetSpecialFolderLocation(NULL, CSIDL_FAVORITES, &pidlUserFavorites);
404  if (FAILED(hr))
405  {
406  WARN("Failed to get the USER favorites folder. Trying to run with just the COMMON one.\n");
407 
408  hr = SHGetSpecialFolderLocation(NULL, CSIDL_COMMON_FAVORITES, &pidlCommonFavorites);
409  if (FAILED_UNEXPECTEDLY(hr))
410  return hr;
411 
412  TRACE("COMMON favorites obtained.\n");
413  *ppidl = pidlCommonFavorites;
414  hr = BindToDesktop(pidlCommonFavorites, ppsfFavorites);
415  return hr;
416  }
417 
418  hr = SHGetSpecialFolderLocation(NULL, CSIDL_COMMON_FAVORITES, &pidlCommonFavorites);
419  if (FAILED_UNEXPECTEDLY(hr))
420  {
421  WARN("Failed to get the COMMON favorites folder. Will use only the USER contents.\n");
422  *ppidl = pidlCommonFavorites;
423  hr = BindToDesktop(pidlUserFavorites, ppsfFavorites);
424  return hr;
425  }
426 
427  TRACE("Both COMMON and USER favorites folders obtained, merging them...\n");
428 
429  hr = BindToDesktop(pidlUserFavorites, &psfUserFavorites);
430  if (FAILED_UNEXPECTEDLY(hr))
431  return hr;
432 
433  hr = BindToDesktop(pidlCommonFavorites, &psfCommonFavorites);
434  if (FAILED_UNEXPECTEDLY(hr))
435  return hr;
436 
437  hr = CMergedFolder_CreateInstance(IID_PPV_ARG(IAugmentedShellFolder, &pasf));
438  if (FAILED_UNEXPECTEDLY(hr))
439  {
440  *ppsfFavorites = psfUserFavorites.Detach();
441  *ppidl = pidlUserFavorites;
442  ILFree(pidlCommonFavorites);
443  return hr;
444  }
445 
446  hr = pasf->AddNameSpace(NULL, psfUserFavorites, pidlUserFavorites, 0xFF00);
447  if (FAILED_UNEXPECTEDLY(hr))
448  return hr;
449 
450  hr = pasf->AddNameSpace(NULL, psfCommonFavorites, pidlCommonFavorites, 0);
451  if (FAILED_UNEXPECTEDLY(hr))
452  return hr;
453 
454  hr = pasf->QueryInterface(IID_PPV_ARG(IShellFolder, ppsfFavorites));
455  pasf.Release();
456 
457  // TODO: obtain the folder's PIDL
458 
459  ILFree(pidlCommonFavorites);
460  ILFree(pidlUserFavorites);
461 
462  return hr;
463 }
464 
466 {
467  CComPtr<IShellMenu> parentMenu;
468  CComPtr<IShellMenu> newMenu;
469  CComPtr<IShellFolder> favoritesFolder;
470  LPITEMIDLIST favoritesPIDL;
471  HWND ownerWindow;
472  HMENU parentHMenu;
473  HMENU favoritesHMenu;
474  HKEY orderRegKey;
475  DWORD disposition;
476  HRESULT hResult;
477  static const TCHAR szFavoritesKey[] =
478  _T("Software\\Microsoft\\Windows\\CurrentVersion\\Explorer\\MenuOrder\\Favorites");
479 
480  if (!IsEqualIID(riid, IID_IShellMenu))
481  return E_FAIL;
482  if (psmd->uId != FCIDM_MENU_FAVORITES)
483  return E_FAIL;
484 
485  // create favorites menu
486  hResult = psmd->punk->QueryInterface(IID_PPV_ARG(IShellMenu, &parentMenu));
487  if (FAILED_UNEXPECTEDLY(hResult))
488  return hResult;
489  hResult = parentMenu->GetMenu(&parentHMenu, &ownerWindow, NULL);
490  if (FAILED_UNEXPECTEDLY(hResult))
491  return hResult;
492  favoritesHMenu = GetSubMenu(parentHMenu, 3);
493  if (favoritesHMenu == NULL)
494  return E_FAIL;
495 
496  if (fFavoritesMenu.p == NULL)
497  {
498  hResult = CMenuBand_CreateInstance(IID_PPV_ARG(IShellMenu, &newMenu));
499  if (FAILED_UNEXPECTEDLY(hResult))
500  return hResult;
501  hResult = newMenu->Initialize(this, FCIDM_MENU_FAVORITES, -1, SMINIT_VERTICAL | SMINIT_CACHED);
502  if (FAILED_UNEXPECTEDLY(hResult))
503  return hResult;
504 
505  RegCreateKeyEx(HKEY_CURRENT_USER, szFavoritesKey,
506  0, NULL, 0, KEY_READ | KEY_WRITE, NULL, &orderRegKey, &disposition);
507 
508  hResult = GetFavoritesFolder(&favoritesFolder, &favoritesPIDL);
509  if (FAILED_UNEXPECTEDLY(hResult))
510  return hResult;
511 
512  hResult = newMenu->SetShellFolder(favoritesFolder, favoritesPIDL, orderRegKey, SMSET_BOTTOM | SMINIT_CACHED | SMINV_ID);
513  if (favoritesPIDL)
514  ILFree(favoritesPIDL);
515 
516  if (FAILED(hResult))
517  return hResult;
518 
519  fFavoritesMenu = newMenu;
520  }
521 
522  hResult = fFavoritesMenu->SetMenu(favoritesHMenu, ownerWindow, SMSET_TOP | SMSET_DONTOWN);
523  if (FAILED_UNEXPECTEDLY(hResult))
524  return hResult;
525 
526  return fFavoritesMenu->QueryInterface(riid, ppvObject);
527 }
528 
530 {
531  switch (uMsg)
532  {
533  case SMC_INITMENU:
534  break;
535  case SMC_CREATE:
536  break;
537  case SMC_EXITMENU:
538  break;
539  case SMC_GETINFO:
540  {
541  SMINFO *infoPtr = reinterpret_cast<SMINFO *>(lParam);
542  if ((infoPtr->dwMask & SMIM_FLAGS) != 0)
543  {
544  if (psmd->uId == FCIDM_MENU_FAVORITES)
545  {
546  infoPtr->dwFlags |= SMIF_DROPCASCADE;
547  }
548  else
549  {
550  infoPtr->dwFlags |= SMIF_TRACKPOPUP;
551  }
552  }
553  if ((infoPtr->dwMask & SMIM_ICON) != 0)
554  infoPtr->iIcon = -1;
555  return S_OK;
556  }
557  case SMC_GETSFINFO:
558  break;
559  case SMC_GETOBJECT:
560  return GetObject(psmd, *reinterpret_cast<IID *>(wParam), reinterpret_cast<void **>(lParam));
561  case SMC_GETSFOBJECT:
562  break;
563  case SMC_EXEC:
564  PostMessageW(psmd->hwnd, WM_COMMAND, psmd->uId, 0);
565  break;
566  case SMC_SFEXEC:
567  SHInvokeDefaultCommand(psmd->hwnd, psmd->psf, psmd->pidlItem);
568  break;
569  case SMC_SFSELECTITEM:
570  break;
571  case 13:
572  // return tooltip
573  break;
574  case SMC_REFRESH:
575  break;
576  case SMC_DEMOTE:
577  break;
578  case SMC_PROMOTE:
579  break;
580  case 0x13:
581  break;
582  case SMC_DEFAULTICON:
583  break;
584  case SMC_NEWITEM:
585  break;
586  case SMC_CHEVRONEXPAND:
587  break;
588  case SMC_DISPLAYCHEVRONTIP:
589  break;
590  case SMC_SETSFOBJECT:
591  break;
592  case SMC_SHCHANGENOTIFY:
593  break;
594  case SMC_CHEVRONGETTIP:
595  break;
596  case SMC_SFDDRESTRICTED:
597  break;
598  case 0x35:
599  break;
600  case 49:
601  break;
602  case 0x10000000:
603  break;
604  }
605  return S_FALSE;
606 }
607 
609 {
610  fMainReBar = NULL;
611  fLocked = false;
616  fAdviseCookie = 0;
617 
618  fMenuCallback->AddRef();
619 }
620 
622 {
623 }
624 
625 void CInternetToolbar::AddDockItem(IUnknown *newItem, int bandID, int flags)
626 {
627  CComPtr<CDockSite> newSite;
628 
629  newSite = new CComObject<CDockSite>;
630  newSite->Initialize(newItem, this, fMainReBar, bandID, flags);
631 }
632 
634 {
635  CComPtr<IDockingWindowSite> dockingWindowSite;
636  RECT availableBorderSpace;
637 
638  HRESULT hResult = fSite->QueryInterface(IID_PPV_ARG(IDockingWindowSite, &dockingWindowSite));
639  if (FAILED_UNEXPECTEDLY(hResult))
640  return hResult;
641  hResult = dockingWindowSite->GetBorderDW(static_cast<IDockingWindow *>(this), &availableBorderSpace);
642  if (FAILED_UNEXPECTEDLY(hResult))
643  return hResult;
644 
645  if (maxHeight && availableBorderSpace.bottom - availableBorderSpace.top > maxHeight)
646  {
647  availableBorderSpace.bottom = availableBorderSpace.top + maxHeight;
648  }
649 
650  return ResizeBorderDW(&availableBorderSpace, fSite, FALSE);
651 }
652 
654 {
655  CComPtr<IShellMenu> menubar;
657  VARIANT menuOut;
658  HWND ownerWindow;
659  HRESULT hResult;
660 
661  if (!pMenuBar)
662  return E_POINTER;
663 
664  *pMenuBar = NULL;
665 
666  hResult = CMenuBand_CreateInstance(IID_PPV_ARG(IShellMenu, &menubar));
667  if (FAILED_UNEXPECTEDLY(hResult))
668  return hResult;
669 
670  hResult = fMenuCallback->QueryInterface(IID_PPV_ARG(IShellMenuCallback, &callback));
671  if (FAILED_UNEXPECTEDLY(hResult))
672  return hResult;
673 
674  hResult = menubar->Initialize(callback, -1, ANCESTORDEFAULT, SMINIT_HORIZONTAL | SMINIT_TOPLEVEL);
675  if (FAILED_UNEXPECTEDLY(hResult))
676  return hResult;
677 
678  // Set Menu
679  {
680  hResult = IUnknown_Exec(fSite, CGID_Explorer, 0x35, 0, NULL, &menuOut);
681  if (FAILED_UNEXPECTEDLY(hResult))
682  return hResult;
683 
684  if (V_VT(&menuOut) != VT_INT_PTR || V_INTREF(&menuOut) == NULL)
685  return E_FAIL;
686 
687  hResult = IUnknown_GetWindow(fSite, &ownerWindow);
688  if (FAILED_UNEXPECTEDLY(hResult))
689  return hResult;
690 
691  HMENU hMenuBar = (HMENU) V_INTREF(&menuOut);
692 
693  // FIXME: Figure out the proper way to do this.
694  HMENU hMenuFavs = GetSubMenu(hMenuBar, 3);
695  if (hMenuFavs)
696  {
698  }
699 
700  hResult = menubar->SetMenu(hMenuBar, ownerWindow, SMSET_DONTOWN);
701  if (FAILED_UNEXPECTEDLY(hResult))
702  return hResult;
703  }
704 
705  hResult = IUnknown_Exec(menubar, CGID_MenuBand, 3, 1, NULL, NULL);
706  if (FAILED_UNEXPECTEDLY(hResult))
707  return hResult;
708 
709  *pMenuBar = menubar.Detach();
710 
711  return S_OK;
712 }
713 
715 {
716  REBARBANDINFOW rebarBandInfo;
717  int bandCount;
718  CDockSite *dockSite;
719  HRESULT hResult;
720 
721  if (locked != fLocked)
722  {
723  fLocked = locked;
724  rebarBandInfo.cbSize = sizeof(rebarBandInfo);
725  rebarBandInfo.fMask = RBBIM_STYLE | RBBIM_LPARAM;
726  bandCount = (int)SendMessage(fMainReBar, RB_GETBANDCOUNT, 0, 0);
727  for (INT x = 0; x < bandCount; x++)
728  {
729  SendMessage(fMainReBar, RB_GETBANDINFOW, x, (LPARAM)&rebarBandInfo);
730  dockSite = reinterpret_cast<CDockSite *>(rebarBandInfo.lParam);
731  if (dockSite != NULL)
732  {
733  rebarBandInfo.fStyle &= ~(RBBS_NOGRIPPER | RBBS_GRIPPERALWAYS);
734  if (dockSite->fFlags & CDockSite::ITF_NOGRIPPER || fLocked)
735  rebarBandInfo.fStyle |= RBBS_NOGRIPPER;
736  if (dockSite->fFlags & CDockSite::ITF_GRIPPERALWAYS && !fLocked)
737  rebarBandInfo.fStyle |= RBBS_GRIPPERALWAYS;
738  SendMessage(fMainReBar, RB_SETBANDINFOW, x, (LPARAM)&rebarBandInfo);
739  }
740  }
741  hResult = ReserveBorderSpace(0);
742 
743  // TODO: refresh view menu?
744  }
745  return S_OK;
746 }
747 
748 HRESULT CInternetToolbar::SetState(const GUID *pguidCmdGroup, long commandID, OLECMD* pcmd)
749 {
750  long state = 0;
751  if (pcmd->cmdf & OLECMDF_ENABLED)
753  if (pcmd->cmdf & OLECMDF_LATCHED)
755  return SetState(pguidCmdGroup, commandID, state);
756 }
757 
758 HRESULT CInternetToolbar::CommandStateChanged(bool newValue, int commandID)
759 {
760  HRESULT hResult;
761 
762  hResult = S_OK;
763  switch (commandID)
764  {
765  case -1:
766  // loop through buttons
767  //for buttons in CLSID_CommonButtons
768  // if up, QueryStatus for up state and update it
769  //
770  //for buttons in fCommandCategory, update with QueryStatus of fCommandTarget
771 
772  OLECMD commandList[4];
773  commandList[0].cmdID = 0x1c;
774  commandList[1].cmdID = 0x1d;
775  commandList[2].cmdID = 0x1e;
776  commandList[3].cmdID = 0x23;
777  IUnknown_QueryStatus(fSite, CGID_Explorer, 4, commandList, NULL);
778  SetState(&CLSID_CommonButtons, gSearchCommandID, &commandList[0]);
779  SetState(&CLSID_CommonButtons, gFoldersCommandID, &commandList[3]);
780  //SetState(&CLSID_CommonButtons, gFavoritesCommandID, &commandList[2]);
781  //SetState(&CLSID_CommonButtons, gHistoryCommandID, &commandList[1]);
782 
783  break;
784  case 1:
785  // forward
786  hResult = SetState(&CLSID_CommonButtons, IDM_GOTO_FORWARD, newValue ? TBSTATE_ENABLED : 0);
787  break;
788  case 2:
789  // back
790  hResult = SetState(&CLSID_CommonButtons, IDM_GOTO_BACK, newValue ? TBSTATE_ENABLED : 0);
791  break;
792  case 3:
793  // up
794  hResult = SetState(&CLSID_CommonButtons, IDM_GOTO_UPONELEVEL, newValue ? TBSTATE_ENABLED : 0);
795  break;
796  }
797  return hResult;
798 }
799 
801 {
802  CComPtr<IServiceProvider> serviceProvider;
803  HRESULT hResult;
804 
805  hResult = fSite->QueryInterface(IID_PPV_ARG(IServiceProvider, &serviceProvider));
806  if (FAILED_UNEXPECTEDLY(hResult))
807  return hResult;
808  hResult = serviceProvider->QueryService(SID_IBandProxy, IID_PPV_ARG(IBandProxy, &fBandProxy));
809  if (FAILED_UNEXPECTEDLY(hResult))
810  {
811  hResult = CBandProxy_CreateInstance(IID_PPV_ARG(IBandProxy, &fBandProxy));
812  if (FAILED_UNEXPECTEDLY(hResult))
813  return hResult;
814  hResult = fBandProxy->SetSite(fSite);
815  if (FAILED_UNEXPECTEDLY(hResult))
816  return hResult;
817  }
818  return S_OK;
819 }
820 
822 {
823  return E_NOTIMPL;
824 }
825 
827 {
828  HRESULT hr = S_FALSE;
829 
830  if (fMenuBar)
832  if (hr != S_FALSE)
833  return hr;
834 
835  if (fControlsBar)
837  if (hr != S_FALSE)
838  return hr;
839 
840  if (fNavigationBar)
842  if (hr != S_FALSE)
843  return hr;
844 
845  return S_FALSE;
846 }
847 
849 {
850  HRESULT hr = S_FALSE;
851 
852  if (fMenuBar)
854  if (hr == S_OK)
855  return hr;
856 
857  if (fControlsBar)
859  if (hr == S_OK)
860  return hr;
861 
862  if (fNavigationBar)
864  if (hr == S_OK)
865  return hr;
866 
867  return S_FALSE;
868 }
869 
871 {
872  if (lphwnd == NULL)
873  return E_POINTER;
874  *lphwnd = m_hWnd;
875  return S_OK;
876 }
877 
879 {
880  return E_NOTIMPL;
881 }
882 
884 {
885  HRESULT hResult;
886 
887  // show the bar here
888  if (fShow)
889  {
890  hResult = ReserveBorderSpace();
891  if (FAILED_UNEXPECTEDLY(hResult))
892  return hResult;
893  }
894 
895  if (fMenuBar)
896  {
897  hResult = IUnknown_ShowDW(fMenuBar, fShow);
898  if (FAILED_UNEXPECTEDLY(hResult))
899  return hResult;
900  }
901 
902  if (fControlsBar)
903  {
904  hResult = IUnknown_ShowDW(fControlsBar, fShow);
905  if (FAILED_UNEXPECTEDLY(hResult))
906  return hResult;
907  }
908  if (fNavigationBar)
909  {
910  hResult = IUnknown_ShowDW(fNavigationBar, fShow);
911  if (FAILED_UNEXPECTEDLY(hResult))
912  return hResult;
913  }
914  if (fLogoBar)
915  {
916  hResult = IUnknown_ShowDW(fLogoBar, fShow);
917  if (FAILED_UNEXPECTEDLY(hResult))
918  return hResult;
919  }
920  return S_OK;
921 }
922 
924 {
925  HRESULT hResult;
926 
927  if (fMenuBar)
928  {
930  if (FAILED_UNEXPECTEDLY(hResult))
931  return hResult;
932  ReleaseCComPtrExpectZero(fMenuBar);
933  }
934  if (fControlsBar)
935  {
937  if (FAILED_UNEXPECTEDLY(hResult))
938  return hResult;
939  ReleaseCComPtrExpectZero(fControlsBar);
940  }
941  if (fNavigationBar)
942  {
944  if (FAILED_UNEXPECTEDLY(hResult))
945  return hResult;
946  ReleaseCComPtrExpectZero(fNavigationBar);
947  }
948  if (fLogoBar)
949  {
951  if (FAILED_UNEXPECTEDLY(hResult))
952  return hResult;
953  ReleaseCComPtrExpectZero(fLogoBar);
954  }
955 
956  SetSite(NULL);
957  return S_OK;
958 }
959 
961  IUnknown *punkToolbarSite, BOOL fReserved)
962 {
963  RECT neededBorderSpace;
964  RECT availableBorderSpace = *prcBorder;
965 
966  SendMessage(fMainReBar, RB_SIZETORECT, RBSTR_CHANGERECT, reinterpret_cast<LPARAM>(&availableBorderSpace));
967 
968  // RBSTR_CHANGERECT does not seem to set the proper size in the rect.
969  // Let's make sure we fetch the actual size properly.
970  ::GetWindowRect(fMainReBar, &availableBorderSpace);
971  neededBorderSpace.left = 0;
972  neededBorderSpace.top = availableBorderSpace.bottom - availableBorderSpace.top;
973  if (!fLocked)
974  neededBorderSpace.top += 3;
975  neededBorderSpace.right = 0;
976  neededBorderSpace.bottom = 0;
977 
978  CComPtr<IDockingWindowSite> dockingWindowSite;
979 
980  HRESULT hResult = fSite->QueryInterface(IID_PPV_ARG(IDockingWindowSite, &dockingWindowSite));
981  if (FAILED_UNEXPECTEDLY(hResult))
982  return hResult;
983 
984  hResult = dockingWindowSite->RequestBorderSpaceDW(static_cast<IDockingWindow *>(this), &neededBorderSpace);
985  if (FAILED_UNEXPECTEDLY(hResult))
986  return hResult;
987 
988  hResult = dockingWindowSite->SetBorderSpaceDW(static_cast<IDockingWindow *>(this), &neededBorderSpace);
989  if (FAILED_UNEXPECTEDLY(hResult))
990  return hResult;
991 
992  return S_OK;
993 }
994 
996 {
997  if (pClassID == NULL)
998  return E_POINTER;
999  *pClassID = CLSID_InternetToolbar;
1000  return S_OK;
1001 }
1002 
1004 {
1005  return E_NOTIMPL;
1006 }
1007 
1009 {
1010  return E_NOTIMPL;
1011 }
1012 
1014 {
1015  return E_NOTIMPL;
1016 }
1017 
1019 {
1020  return E_NOTIMPL;
1021 }
1022 
1024 {
1025  CComPtr<IShellMenu> menuBar;
1026  CComPtr<IUnknown> logoBar;
1027  CComPtr<IUnknown> toolsBar;
1028  CComPtr<IUnknown> navigationBar;
1029  HRESULT hResult;
1030 
1031  /* Create and attach the menubar to the rebar */
1032  hResult = CreateMenuBar(&menuBar);
1033  if (FAILED_UNEXPECTEDLY(hResult))
1034  return hResult;
1036 
1037  hResult = IUnknown_GetWindow(menuBar, &fMenuBandWindow);
1038  fMenuBar.Attach(menuBar.Detach()); // transfer the ref count
1039 
1040  // FIXME: The ros Rebar does not properly support fixed-size items such as the brandband,
1041  // and it will put them in their own row, sized to take up the whole row.
1042 #if 0
1043  /* Create and attach the brand/logo to the rebar */
1044  hResult = CBrandBand_CreateInstance(IID_PPV_ARG(IUnknown, &logoBar));
1045  if (FAILED_UNEXPECTEDLY(hResult))
1046  return hResult;
1048  fLogoBar.Attach(logoBar.Detach()); // transfer the ref count
1049 #endif
1050 
1051  /* Create and attach the standard toolbar to the rebar */
1052  hResult = CToolsBand_CreateInstance(IID_PPV_ARG(IUnknown, &toolsBar));
1053  if (FAILED_UNEXPECTEDLY(hResult))
1054  return hResult;
1056  fControlsBar.Attach(toolsBar.Detach()); // transfer the ref count
1058  if (FAILED_UNEXPECTEDLY(hResult))
1059  return hResult;
1060 
1061  /* Create and attach the address/navigation toolbar to the rebar */
1062  hResult = CAddressBand_CreateInstance(IID_PPV_ARG(IUnknown, &navigationBar));
1063  if (FAILED_UNEXPECTEDLY(hResult))
1064  return hResult;
1066  fNavigationBar.Attach(navigationBar.Detach());
1068 
1069  return S_OK;
1070 }
1071 
1073 {
1074  int index = (int)SendMessage(fMainReBar, RB_IDTOINDEX, BandID, 0);
1075 
1078 
1079  return (bandInfo.fStyle & RBBS_HIDDEN) ? S_FALSE : S_OK;
1080 }
1081 
1083 {
1084  int index = (int)SendMessage(fMainReBar, RB_IDTOINDEX, BandID, 0);
1085 
1088 
1089  if (bandInfo.fStyle & RBBS_HIDDEN)
1090  bandInfo.fStyle &= ~RBBS_HIDDEN;
1091  else
1092  bandInfo.fStyle |= RBBS_HIDDEN;
1093 
1095 
1096  ReserveBorderSpace(0);
1097  return S_OK;
1098 }
1099 
1101  ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText)
1102 {
1103  if (IsEqualIID(*pguidCmdGroup, CGID_PrivCITCommands))
1104  {
1105  while (cCmds != 0)
1106  {
1107  switch (prgCmds->cmdID)
1108  {
1109  case ITID_TEXTLABELS: // Text Labels state
1110  prgCmds->cmdf = OLECMDF_SUPPORTED;
1111  break;
1112  case ITID_TOOLBARBANDSHOWN: // toolbar visibility
1113  prgCmds->cmdf = OLECMDF_SUPPORTED | OLECMDF_ENABLED;
1115  prgCmds->cmdf |= OLECMDF_LATCHED;
1116  break;
1117  case ITID_ADDRESSBANDSHOWN: // address bar visibility
1118  prgCmds->cmdf = OLECMDF_SUPPORTED | OLECMDF_ENABLED;
1120  prgCmds->cmdf |= OLECMDF_LATCHED;
1121  break;
1122  case ITID_LINKSBANDSHOWN: // links bar visibility
1123  prgCmds->cmdf = 0;
1124  break;
1125  case ITID_MENUBANDSHOWN: // Menubar band visibility
1126  prgCmds->cmdf = OLECMDF_SUPPORTED;
1127  if (fMenuBar)
1128  prgCmds->cmdf |= OLECMDF_LATCHED;
1129  break;
1130  case ITID_AUTOHIDEENABLED: // Auto hide enabled/disabled
1131  prgCmds->cmdf = 0;
1132  break;
1133  case ITID_CUSTOMIZEENABLED: // customize enabled
1134  prgCmds->cmdf = OLECMDF_SUPPORTED;
1135  break;
1136  case ITID_TOOLBARLOCKED: // lock toolbars
1137  prgCmds->cmdf = OLECMDF_SUPPORTED | OLECMDF_ENABLED;
1138  if (fLocked)
1139  prgCmds->cmdf |= OLECMDF_LATCHED;
1140  break;
1141  default:
1142  prgCmds->cmdf = 0;
1143  break;
1144  }
1145  prgCmds++;
1146  cCmds--;
1147  }
1148  return S_OK;
1149  }
1150  return E_FAIL;
1151 }
1152 
1154  DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
1155 {
1156  if (IsEqualIID(*pguidCmdGroup, CGID_PrivCITCommands))
1157  {
1158  switch (nCmdID)
1159  {
1160  case 1:
1161  // what do I do here?
1162  return S_OK;
1163  case ITID_TEXTLABELS:
1164  // toggle text labels
1165  return S_OK;
1166  case ITID_TOOLBARBANDSHOWN:
1168  case ITID_ADDRESSBANDSHOWN:
1170  case ITID_LINKSBANDSHOWN:
1171  // toggle links band visibility
1172  return S_OK;
1173  case ITID_CUSTOMIZEENABLED:
1174  // run customize
1175  return S_OK;
1176  case ITID_TOOLBARLOCKED:
1177  return LockUnlockToolbars(!fLocked);
1178  }
1179  }
1180  return E_FAIL;
1181 }
1182 
1184 {
1185  return E_NOTIMPL;
1186 }
1187 
1189 {
1190  return E_NOTIMPL;
1191 }
1192 
1194  LCID lcid, DISPID *rgDispId)
1195 {
1196  return E_NOTIMPL;
1197 }
1198 
1200  WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
1201 {
1202  HRESULT hResult;
1203 
1204  switch(dispIdMember)
1205  {
1206  case DISPID_BEFORENAVIGATE:
1207  hResult = S_OK;
1208  break;
1210  hResult = S_OK;
1211  break;
1213  if (pDispParams->cArgs != 2)
1214  return E_INVALIDARG;
1215  if (V_VT(&pDispParams->rgvarg[0]) != VT_BOOL || V_VT(&pDispParams->rgvarg[1]) != VT_I4)
1216  return E_INVALIDARG;
1217  return CommandStateChanged(V_BOOL(&pDispParams->rgvarg[0]) != VARIANT_FALSE,
1218  V_I4(&pDispParams->rgvarg[1]));
1219  case DISPID_DOWNLOADBEGIN:
1220  hResult = S_OK;
1221  break;
1223  hResult = S_OK;
1224  break;
1226  hResult = S_OK;
1227  break;
1228  }
1229  return S_OK;
1230 }
1231 
1233 {
1234  HRESULT hResult;
1235 
1236  TRACE("SetCommandTarget %p category %s param %d\n", theTarget, wine_dbgstr_guid(category), param14);
1237 
1238  fCommandTarget.Release();
1240  if (FAILED_UNEXPECTEDLY(hResult))
1241  return hResult;
1243  return S_OK;
1244 }
1245 
1247 {
1248  return E_NOTIMPL;
1249 }
1250 
1252 {
1253  return E_NOTIMPL;
1254 }
1255 
1257  HINSTANCE param10, LPCTSTR param14, long *param18)
1258 {
1259  long result;
1260 
1262  reinterpret_cast<WPARAM>(param10), reinterpret_cast<LPARAM>(param14));
1263  *param18 = result;
1264  if (result == -1)
1265  return E_FAIL;
1266  return S_OK;
1267 }
1268 
1269 HRESULT STDMETHODCALLTYPE CInternetToolbar::GetButton(const GUID *pguidCmdGroup, long param10, long param14)
1270 {
1271  return E_NOTIMPL;
1272 }
1273 
1274 HRESULT STDMETHODCALLTYPE CInternetToolbar::GetState(const GUID *pguidCmdGroup, long commandID, long *theState)
1275 {
1276  if (theState == NULL)
1277  return E_POINTER;
1278  // map the command id
1279  *theState = (long)::SendMessage(fToolbarWindow, TB_GETSTATE, commandID, 0);
1280  return S_OK;
1281 }
1282 
1283 HRESULT STDMETHODCALLTYPE CInternetToolbar::SetState(const GUID *pguidCmdGroup, long commandID, long theState)
1284 {
1285  // map the command id
1286  ::SendMessage(fToolbarWindow, TB_SETSTATE, commandID, MAKELONG(theState, 0));
1287  return S_OK;
1288 }
1289 
1290 HRESULT STDMETHODCALLTYPE CInternetToolbar::AddBitmap(const GUID *pguidCmdGroup, long param10, long buttonCount,
1291  TBADDBITMAP *lParam, long *newIndex, COLORREF param20)
1292 {
1293  return E_NOTIMPL;
1294 }
1295 
1297 {
1298  if (paramC == NULL)
1299  return E_POINTER;
1300  *paramC = MAKELONG(24, 24);
1301  return S_OK;
1302 }
1303 
1306 {
1307  return E_NOTIMPL;
1308 }
1309 
1311  HIMAGELIST param14, HIMAGELIST param18)
1312 {
1313  return E_NOTIMPL;
1314 }
1315 
1316 HRESULT STDMETHODCALLTYPE CInternetToolbar::ModifyButton(const GUID *pguidCmdGroup, long param10, long param14)
1317 {
1318  return E_NOTIMPL;
1319 }
1320 
1322 {
1323  return E_NOTIMPL;
1324 }
1325 
1327 {
1328  CComPtr<IBrowserService> browserService;
1329  HWND ownerWindow;
1330  HWND dockContainer;
1331  HRESULT hResult;
1332 
1333  if (pUnkSite == NULL)
1334  {
1335  hResult = AtlUnadvise(fSite, DIID_DWebBrowserEvents, fAdviseCookie);
1337  DestroyWindow();
1338  fSite.Release();
1339  }
1340  else
1341  {
1342  // get window handle of owner
1343  hResult = IUnknown_GetWindow(pUnkSite, &ownerWindow);
1344  if (FAILED_UNEXPECTEDLY(hResult))
1345  return hResult;
1346  if (ownerWindow == NULL)
1347  return E_FAIL;
1348 
1349  // create dock container
1350  fSite = pUnkSite;
1351  dockContainer = SHCreateWorkerWindowW(0, ownerWindow, 0,
1353  if (dockContainer == NULL)
1354  return E_FAIL;
1355  SubclassWindow(dockContainer);
1356 
1357  // create rebar in dock container
1363  0, 0, 700, 60, dockContainer, NULL, _AtlBaseModule.GetModuleInstance(), NULL);
1364  if (fMainReBar == NULL)
1365  return E_FAIL;
1366 
1367  // take advice to watch events
1368  hResult = IUnknown_QueryService(pUnkSite, SID_SShellBrowser, IID_PPV_ARG(IBrowserService, &browserService));
1369  hResult = AtlAdvise(browserService, static_cast<IDispatch *>(this), DIID_DWebBrowserEvents, &fAdviseCookie);
1370  }
1371  return S_OK;
1372 }
1373 
1375 {
1376  if (ppvSite == NULL)
1377  return E_POINTER;
1378  if (fSite.p != NULL)
1379  return fSite->QueryInterface(riid, ppvSite);
1380  *ppvSite = NULL;
1381  return S_OK;
1382 }
1383 
1385 {
1386  HRESULT hResult;
1387 
1388  if (IsEqualIID(guidService, IID_IBandSite))
1389  return this->QueryInterface(riid, ppvObject);
1390  if (IsEqualIID(guidService, SID_IBandProxy))
1391  {
1392  if (fBandProxy.p == NULL)
1393  {
1394  hResult = CreateAndInitBandProxy();
1395  if (FAILED_UNEXPECTEDLY(hResult))
1396  return hResult;
1397  }
1398  return fBandProxy->QueryInterface(riid, ppvObject);
1399  }
1400  return IUnknown_QueryService(fSite, guidService, riid, ppvObject);
1401 }
1402 
1404  HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
1405 {
1406  HRESULT hResult;
1407 
1408  if (fMenuBar)
1409  {
1410  hResult = IUnknown_RelayWinEvent(fMenuBar, hWnd, uMsg, wParam, lParam, theResult);
1411  if (hResult != S_FALSE)
1412  return hResult;
1413  }
1414 
1415  if (fNavigationBar)
1416  {
1417  hResult = IUnknown_RelayWinEvent(fNavigationBar, hWnd, uMsg, wParam, lParam, theResult);
1418  if (hResult != S_FALSE)
1419  return hResult;
1420  }
1421 
1422  if (fLogoBar)
1423  {
1424  hResult = IUnknown_RelayWinEvent(fLogoBar, hWnd, uMsg, wParam, lParam, theResult);
1425  if (hResult != S_FALSE)
1426  return hResult;
1427  }
1428 
1429  return S_FALSE;
1430 }
1431 
1433 {
1434  UNIMPLEMENTED;
1435  return E_NOTIMPL;
1436 }
1437 
1439 {
1440  UNIMPLEMENTED;
1441  return E_NOTIMPL;
1442 }
1443 
1445 {
1446  UNIMPLEMENTED;
1447  return E_NOTIMPL;
1448 }
1449 
1451  IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName)
1452 {
1453  if (ppstb == NULL)
1454  return E_POINTER;
1455  if (dwBandID == ITBBID_MENUBAND && fMenuBar.p != NULL)
1456  return fMenuBar->QueryInterface(IID_PPV_ARG(IDeskBand, ppstb));
1457  //if (dwBandID == ITBBID_BRANDBAND && fLogoBar.p != NULL)
1458  // return fLogoBar->QueryInterface(IID_PPV_ARG(IDeskBand, ppstb));
1459  *ppstb = NULL;
1460  return E_FAIL;
1461 }
1462 
1464 {
1465  UNIMPLEMENTED;
1466  return E_NOTIMPL;
1467 }
1468 
1470 {
1471  UNIMPLEMENTED;
1472  return E_NOTIMPL;
1473 }
1474 
1476 {
1477  UNIMPLEMENTED;
1478  return E_NOTIMPL;
1479 }
1480 
1482 {
1483  UNIMPLEMENTED;
1484  return E_NOTIMPL;
1485 }
1486 
1488 {
1489  UNIMPLEMENTED;
1490  return E_NOTIMPL;
1491 }
1492 
1493 LRESULT CInternetToolbar::OnTravelBack(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
1494 {
1495  CComPtr<IWebBrowser> webBrowser;
1496  HRESULT hResult;
1497 
1498  hResult = IUnknown_QueryService(fSite, SID_SShellBrowser, IID_PPV_ARG(IWebBrowser, &webBrowser));
1499  if (FAILED_UNEXPECTEDLY(hResult))
1500  return 0;
1501  hResult = webBrowser->GoBack();
1502  return 1;
1503 }
1504 
1505 LRESULT CInternetToolbar::OnTravelForward(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
1506 {
1507  CComPtr<IWebBrowser> webBrowser;
1508  HRESULT hResult;
1509 
1510  hResult = IUnknown_QueryService(fSite, SID_SShellBrowser, IID_PPV_ARG(IWebBrowser, &webBrowser));
1511  if (FAILED_UNEXPECTEDLY(hResult))
1512  return 0;
1513  hResult = webBrowser->GoForward();
1514  return 1;
1515 }
1516 
1517 LRESULT CInternetToolbar::OnUpLevel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
1518 {
1519  IUnknown_Exec(fSite, CGID_ShellBrowser, IDM_GOTO_UPONELEVEL, 0, NULL, NULL);
1520  return 1;
1521 }
1522 
1523 LRESULT CInternetToolbar::OnSearch(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
1524 {
1525  IUnknown_Exec(fSite, CGID_Explorer, 0x1c, 1, NULL, NULL);
1526  return 1;
1527 }
1528 
1529 LRESULT CInternetToolbar::OnFolders(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
1530 {
1531  IUnknown_Exec(fSite, CGID_Explorer, 0x23, 0, NULL, NULL);
1532  return 1;
1533 }
1534 
1536 {
1537  HRESULT hResult;
1538 
1539  if (fCommandTarget.p != NULL)
1540  {
1541  hResult = fCommandTarget->Exec(&fCommandCategory, wID, 0, NULL, NULL);
1542  }
1543  return 1;
1544 }
1545 
1547 {
1548  CComPtr<IBrowserService> browserService;
1549  CComPtr<IOleCommandTarget> commandTarget;
1550  CComPtr<ITravelLog> travelLog;
1551  NMTOOLBARW *notifyInfo;
1552  RECT bounds;
1553  HMENU newMenu;
1554  TPMPARAMS params;
1555  int selectedItem;
1556  VARIANT parmIn;
1557  OLECMD commandInfo;
1558  HRESULT hResult;
1559  wchar_t templateString[200];
1560 
1561  notifyInfo = (NMTOOLBARW *)pNMHDR;
1562  if (notifyInfo->hdr.hwndFrom != fToolbarWindow)
1563  {
1564  // not from the toolbar, keep looking for a message handler
1565  bHandled = FALSE;
1566  return 0;
1567  }
1568  SendMessage(fToolbarWindow, TB_GETRECT, notifyInfo->iItem, reinterpret_cast<LPARAM>(&bounds));
1569  ::MapWindowPoints(fToolbarWindow, NULL, reinterpret_cast<POINT *>(&bounds), 2);
1570  switch (notifyInfo->iItem)
1571  {
1572  case IDM_GOTO_BACK:
1573  newMenu = CreatePopupMenu();
1575  hResult = browserService->GetTravelLog(&travelLog);
1576  hResult = travelLog->InsertMenuEntries(browserService, newMenu, 0, 1, 9, TLMENUF_BACK);
1577  commandInfo.cmdID = 0x1d;
1578  hResult = IUnknown_QueryStatus(browserService, CGID_Explorer, 1, &commandInfo, NULL);
1579  if ((commandInfo.cmdf & (OLECMDF_ENABLED | OLECMDF_LATCHED)) == OLECMDF_ENABLED &&
1580  travelLog->CountEntries(browserService) > 1)
1581  {
1582  AppendMenuW(newMenu, MF_SEPARATOR, -1, L"");
1583 
1584  if (LoadStringW(_AtlBaseModule.GetResourceInstance(),
1585  IDS_HISTORYTEXT, templateString, sizeof(templateString) / sizeof(wchar_t)) == 0)
1586  StringCbCopyW(templateString, sizeof(templateString), L"&History\tCtrl+H");
1587 
1588  AppendMenuW(newMenu, MF_STRING /* | MF_OWNERDRAW */, IDM_EXPLORERBAR_HISTORY, templateString);
1589  }
1590  params.cbSize = sizeof(params);
1591  params.rcExclude = bounds;
1592  selectedItem = TrackPopupMenuEx(newMenu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD,
1593  bounds.left, bounds.bottom, m_hWnd, &params);
1594  if (selectedItem == IDM_EXPLORERBAR_HISTORY)
1595  {
1596  V_VT(&parmIn) = VT_I4;
1597  V_I4(&parmIn) = 1;
1598  Exec(&CGID_Explorer, 0x1d, 2, &parmIn, NULL);
1599  }
1600  else if (selectedItem != 0)
1601  hResult = travelLog->Travel(browserService, -selectedItem);
1602  DestroyMenu(newMenu);
1603  break;
1604  case IDM_GOTO_FORWARD:
1605  newMenu = CreatePopupMenu();
1607  hResult = browserService->GetTravelLog(&travelLog);
1608  hResult = travelLog->InsertMenuEntries(browserService, newMenu, 0, 1, 9, TLMENUF_FORE);
1609  commandInfo.cmdID = 0x1d;
1610  hResult = IUnknown_QueryStatus(browserService, CGID_Explorer, 1, &commandInfo, NULL);
1611  if ((commandInfo.cmdf & (OLECMDF_ENABLED | OLECMDF_LATCHED)) == OLECMDF_ENABLED &&
1612  travelLog->CountEntries(browserService) > 1)
1613  {
1614  AppendMenuW(newMenu, MF_SEPARATOR, -1, L"");
1615 
1616  if (LoadStringW(_AtlBaseModule.GetResourceInstance(),
1617  IDS_HISTORYTEXT, templateString, sizeof(templateString) / sizeof(wchar_t)) == 0)
1618  StringCbCopyW(templateString, sizeof(templateString), L"&History\tCtrl+H");
1619 
1620  AppendMenuW(newMenu, MF_STRING /* | MF_OWNERDRAW */, IDM_EXPLORERBAR_HISTORY, templateString);
1621  }
1622  params.cbSize = sizeof(params);
1623  params.rcExclude = bounds;
1624  selectedItem = TrackPopupMenuEx(newMenu, TPM_LEFTALIGN | TPM_TOPALIGN | TPM_RETURNCMD,
1625  bounds.left, bounds.bottom, m_hWnd, &params);
1626  if (selectedItem == IDM_EXPLORERBAR_HISTORY)
1627  {
1628  V_VT(&parmIn) = VT_I4;
1629  V_I4(&parmIn) = 1;
1630  Exec(&CGID_Explorer, 0x1d, 2, &parmIn, NULL);
1631  }
1632  else if (selectedItem != 0)
1633  hResult = travelLog->Travel(browserService, selectedItem);
1634  DestroyMenu(newMenu);
1635  break;
1636  case gViewsCommandID:
1637  VARIANT inValue;
1638  CComVariant outValue;
1639  HRESULT hResult;
1640 
1641  V_VT(&inValue) = VT_INT_PTR;
1642  V_INTREF(&inValue) = reinterpret_cast<INT *>(&bounds);
1643 
1644  if (fCommandTarget.p != NULL)
1645  hResult = fCommandTarget->Exec(&fCommandCategory, FCIDM_SHVIEW_AUTOARRANGE, 1, &inValue, &outValue);
1646  // pvaOut is VT_I4 with value 0x403
1647  break;
1648  }
1649  return TBDDRET_DEFAULT;
1650 }
1651 
1653 {
1654  return 1;
1655 }
1656 
1658 {
1659  return 1;
1660 }
1661 
1663 {
1664  HMENU contextMenuBar;
1665  HMENU contextMenu;
1666  POINT clickLocation;
1667  int command;
1668  RBHITTESTINFO hitTestInfo;
1669  REBARBANDINFOW rebarBandInfo;
1670  int bandID;
1671  BOOL goButtonChecked;
1672 
1673  clickLocation.x = LOWORD(lParam);
1674  clickLocation.y = HIWORD(lParam);
1675  hitTestInfo.pt = clickLocation;
1676  ScreenToClient(&hitTestInfo.pt);
1677  SendMessage(fMainReBar, RB_HITTEST, 0, (LPARAM)&hitTestInfo);
1678  if (hitTestInfo.iBand == -1)
1679  return 0;
1680  rebarBandInfo.cbSize = sizeof(rebarBandInfo);
1681  rebarBandInfo.fMask = RBBIM_ID;
1682  SendMessage(fMainReBar, RB_GETBANDINFOW, hitTestInfo.iBand, (LPARAM)&rebarBandInfo);
1683  bandID = rebarBandInfo.wID;
1684  contextMenuBar = LoadMenu(_AtlBaseModule.GetResourceInstance(), MAKEINTRESOURCE(IDM_CABINET_CONTEXTMENU));
1685  contextMenu = GetSubMenu(contextMenuBar, 0);
1686  switch (bandID)
1687  {
1688  case ITBBID_MENUBAND: // menu band
1692  break;
1693  case ITBBID_BRANDBAND: // brand band
1697  break;
1698  case ITBBID_TOOLSBAND: // tools band
1701  break;
1702  case ITBBID_ADDRESSBAND: // navigation band
1705  break;
1706  default:
1707  break;
1708  }
1709 
1711 
1717  goButtonChecked = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton", FALSE, TRUE);
1718  SHCheckMenuItem(contextMenu, IDM_TOOLBARS_GOBUTTON, goButtonChecked);
1719 
1720  // TODO: use GetSystemMetrics(SM_MENUDROPALIGNMENT) to determine menu alignment
1722  clickLocation.x, clickLocation.y, 0, m_hWnd, NULL);
1723  switch (command)
1724  {
1725  case IDM_TOOLBARS_STANDARDBUTTONS: // standard buttons
1727  break;
1728  case IDM_TOOLBARS_ADDRESSBAR: // address bar
1730  break;
1731  case IDM_TOOLBARS_LINKSBAR: // links
1732  break;
1733  case IDM_TOOLBARS_LOCKTOOLBARS: // lock the toolbars
1735  break;
1736  case IDM_TOOLBARS_CUSTOMIZE: // customize
1738  break;
1739  case IDM_TOOLBARS_GOBUTTON:
1741  break;
1742  }
1743 
1744  DestroyMenu(contextMenuBar);
1745  return 1;
1746 }
1747 
1749 {
1750  if (wParam != SIZE_MINIMIZED)
1751  {
1754  }
1755  return 1;
1756 }
1757 
1759 {
1760  if ((short)lParam != HTCLIENT || (HWND)wParam != m_hWnd)
1761  {
1762  bHandled = FALSE;
1763  return 0;
1764  }
1766  return 1;
1767 }
1768 
1769 LRESULT CInternetToolbar::OnTipText(UINT idControl, NMHDR *pNMHDR, BOOL &bHandled)
1770 {
1771  CComPtr<IBrowserService> browserService;
1772  CComPtr<ITravelLog> travelLog;
1773  TOOLTIPTEXTW *pTTTW;
1774  UINT nID;
1775  HRESULT hResult;
1776  wchar_t tempString[300];
1777 
1778  pTTTW = reinterpret_cast<TOOLTIPTEXTW *>(pNMHDR);
1779  if ((pTTTW->uFlags & TTF_IDISHWND) != 0)
1780  nID = ::GetDlgCtrlID((HWND)pNMHDR->idFrom);
1781  else
1782  nID = (UINT)pNMHDR->idFrom;
1783 
1784  if (nID != 0)
1785  {
1786  if (nID == (UINT)IDM_GOTO_BACK || nID == (UINT)IDM_GOTO_FORWARD)
1787  {
1788  // TODO: Should this call QueryService?
1789  hResult = fSite->QueryInterface(IID_PPV_ARG(IBrowserService, &browserService));
1790  hResult = browserService->GetTravelLog(&travelLog);
1791  hResult = travelLog->GetToolTipText(browserService,
1792  (nID == (UINT)IDM_GOTO_BACK) ? TLOG_BACK : TLOG_FORE,
1793  0, tempString, 299);
1794  if (FAILED_UNEXPECTEDLY(hResult))
1795  {
1796  bHandled = FALSE;
1797  return 0;
1798  }
1799  }
1800  else
1801  tempString[0] = 0;
1802  wcsncpy (pTTTW->szText, tempString, sizeof(pTTTW->szText) / sizeof(wchar_t));
1803  ::SetWindowPos(pNMHDR->hwndFrom, HWND_TOP, 0, 0, 0, 0,
1805  return 0;
1806  }
1807  return 0;
1808 }
1809 
1811 {
1812  LRESULT theResult;
1813  HRESULT hResult;
1814 
1815  hResult = OnWinEvent((HWND) lParam, uMsg, wParam, lParam, &theResult);
1816 
1817  bHandled = hResult == S_OK;
1818 
1819  return FAILED_UNEXPECTEDLY(hResult) ? 0 : theResult;
1820 }
1822 {
1823  NMHDR *notifyHeader;
1824  LRESULT theResult;
1825  HRESULT hResult;
1826 
1827  notifyHeader = reinterpret_cast<NMHDR *>(lParam);
1828 
1829  hResult = OnWinEvent(notifyHeader->hwndFrom, uMsg, wParam, lParam, &theResult);
1830 
1831  bHandled = hResult == S_OK;
1832 
1833  return FAILED_UNEXPECTEDLY(hResult) ? 0 : theResult;
1834 }
1835 
1837 {
1838  bHandled = FALSE;
1839  if (fLocked)
1840  return 0;
1841 
1842  if (wParam & MK_CONTROL)
1843  return 0;
1844 
1845  fSizing = TRUE;
1846 
1847  DWORD msgp = GetMessagePos();
1848 
1849  fStartPosition.x = GET_X_LPARAM(msgp);
1850  fStartPosition.y = GET_Y_LPARAM(msgp);
1851 
1852  RECT rc;
1853  GetWindowRect(&rc);
1854 
1855  fStartHeight = rc.bottom - rc.top;
1856 
1857  SetCapture();
1858 
1859  bHandled = TRUE;
1860  return 0;
1861 }
1862 
1864 {
1865  bHandled = FALSE;
1866  if (!fSizing)
1867  return 0;
1868 
1869  DWORD msgp = GetMessagePos();
1870 
1871  POINT pt;
1872  pt.x = GET_X_LPARAM(msgp);
1873  pt.y = GET_Y_LPARAM(msgp);
1874 
1876 
1877  bHandled = TRUE;
1878  return 0;
1879 }
1880 
1882 {
1883  bHandled = FALSE;
1884  if (!fSizing)
1885  return 0;
1886 
1887  OnMouseMove(uMsg, wParam, lParam, bHandled);
1888 
1889  fSizing = FALSE;
1890 
1891  ReleaseCapture();
1892 
1893  return 0;
1894 }
1895 
1897 {
1898  HRESULT hr;
1899  HWND hwndMenu;
1900 
1901  hr = IUnknown_GetWindow(fMenuBar, &hwndMenu);
1902  if (FAILED_UNEXPECTEDLY(hr))
1903  return 0;
1904 
1905  CComPtr<IWinEventHandler> menuWinEventHandler;
1906  hr = fMenuBar->QueryInterface(IID_PPV_ARG(IWinEventHandler, &menuWinEventHandler));
1907  if (FAILED_UNEXPECTEDLY(hr))
1908  return 0;
1909 
1910  LRESULT lres;
1911  hr = menuWinEventHandler->OnWinEvent(hwndMenu, uMsg, wParam, lParam, &lres);
1912  if (FAILED_UNEXPECTEDLY(hr))
1913  return 0;
1914 
1915  return lres;
1916 }
DBIM_BKCOLOR struct tagDESKBANDINFO DESKBANDINFO
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define DISPID_COMMANDSTATECHANGE
Definition: webchild.h:40
#define IDM_TOOLBARS_ADDRESSBAR
Definition: resource.h:31
virtual HRESULT STDMETHODCALLTYPE EnumNameSpace(ULONG, PULONG)=0
virtual HRESULT STDMETHODCALLTYPE QueryBand(DWORD dwBandID, IDeskBand **ppstb, DWORD *pdwState, LPWSTR pszName, int cchName)
const DOCKBAR PVOID HWND HWND * hwnd
Definition: tooldock.h:22
#define MAKEINTRESOURCE
Definition: winuser.h:591
virtual HRESULT STDMETHODCALLTYPE GetTypeInfo(UINT iTInfo, LCID lcid, ITypeInfo **ppTInfo)
virtual HRESULT STDMETHODCALLTYPE SetBandSiteInfo(const BANDSITEINFO *pbsinfo)
#define IDM_TOOLBARS_LINKSBAR
Definition: resource.h:32
virtual HRESULT STDMETHODCALLTYPE AddString(const GUID *pguidCmdGroup, HINSTANCE param10, LPCTSTR param14, long *param18)
virtual HRESULT STDMETHODCALLTYPE IsWindowOwner(HWND hWnd)
#define RB_SIZETORECT
Definition: commctrl.h:1570
#define REFIID
Definition: guiddef.h:113
#define TRUE
Definition: types.h:120
const CHAR * LPCTSTR
Definition: xmlstorage.h:193
#define IDM_GOTO_UPONELEVEL
Definition: resource.h:47
#define TLOG_BACK
Definition: shlobj.h:2492
virtual HRESULT STDMETHODCALLTYPE AddButtons(const GUID *pguidCmdGroup, long buttonCount, TBBUTTON *buttons)
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:925
Definition: compat.h:1939
LRESULT OnQueryInsert(UINT idControl, NMHDR *pNMHDR, BOOL &bHandled)
virtual HRESULT STDMETHODCALLTYPE CloseDW(DWORD dwReserved)
DESKBANDINFO fDeskBandInfo
#define RBBIM_CHILD
Definition: commctrl.h:1478
#define IDM_GOTO_FORWARD
Definition: resource.h:46
HRESULT CBandProxy_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:42
#define RBS_VARHEIGHT
Definition: commctrl.h:1443
#define MF_BYCOMMAND
Definition: winuser.h:202
long y
Definition: polytest.cpp:48
LPITEMIDLIST pidlItem
Definition: shobjidl.idl:2624
#define IDS_HISTORYTEXT
Definition: resource.h:123
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define FCIDM_SHVIEW_AUTOARRANGE
Definition: shresdef.h:750
HRESULT hr
Definition: shlfolder.c:183
Definition: scsiwmi.h:51
long x
Definition: polytest.cpp:48
HRESULT WINAPI AtlAdvise(IUnknown *pUnkCP, IUnknown *pUnk, const IID *iid, DWORD *pdw)
Definition: atl.c:46
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd)
#define WS_EX_LTRREADING
Definition: winuser.h:393
#define KEY_READ
Definition: nt_native.h:1023
#define CSIDL_COMMON_FAVORITES
Definition: shlobj.h:2033
#define pt(x, y)
Definition: drawing.c:79
#define TPM_LEFTALIGN
Definition: winuser.h:2331
REFIID riid
Definition: precomp.h:44
#define TB_ADDSTRINGW
Definition: commctrl.h:1104
#define TB_SETSTATE
Definition: commctrl.h:1026
#define ITID_LINKSBANDSHOWN
Definition: undocshell.h:774
#define IDM_FAVORITES_EMPTY
Definition: resource.h:52
LRESULT OnWinIniChange(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
HRESULT IsBandVisible(int BandID)
virtual HRESULT STDMETHODCALLTYPE ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
#define TPM_RETURNCMD
Definition: winuser.h:2341
LRESULT OnQueryDelete(UINT idControl, NMHDR *pNMHDR, BOOL &bHandled)
#define HKEY_CURRENT_USER
Definition: winreg.h:11
virtual HRESULT STDMETHODCALLTYPE CallbackSM(LPSMDATA psmd, UINT uMsg, WPARAM wParam, LPARAM lParam)
HRESULT WINAPI SHInvokeDefaultCommand(HWND hWnd, IShellFolder *lpFolder, LPCITEMIDLIST lpApidl)
Definition: ordinal.c:2928
#define WARN(fmt,...)
Definition: debug.h:111
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
BOOL WINAPI SHRegGetBoolUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, BOOL fIgnoreHKCU, BOOL fDefault)
Definition: reg.c:770
static const int gSearchCommandID
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
virtual HRESULT STDMETHODCALLTYPE SetCommandTarget(IUnknown *theTarget, GUID *category, long param14)
#define MF_STRING
Definition: winuser.h:138
#define RBBS_BREAK
Definition: commctrl.h:1461
HWND hWnd
Definition: settings.c:17
REFIID LPVOID * ppv
Definition: atlbase.h:39
LONG top
Definition: windef.h:292
#define DISPID_DOCUMENTCOMPLETE
Definition: webchild.h:61
#define IDM_CABINET_CONTEXTMENU
Definition: resource.h:87
#define GET_X_LPARAM(lp)
Definition: windowsx.h:274
IUnknown * punk
Definition: shobjidl.idl:2622
#define RBBIM_ID
Definition: commctrl.h:1482
const char * wine_dbgstr_guid(const GUID *guid)
#define DISPID_DOWNLOADCOMPLETE
Definition: webchild.h:39
virtual HRESULT STDMETHODCALLTYPE InitNew()
#define HWND_TOP
Definition: winuser.h:1193
GLint GLint GLint GLint GLint x
Definition: gl.h:1548
#define RBBS_TOPALIGN
Definition: commctrl.h:1472
#define TB_CUSTOMIZE
Definition: commctrl.h:1102
#define RB_GETBANDINFOW
Definition: commctrl.h:1581
#define TB_GETRECT
Definition: commctrl.h:1125
#define TBDDRET_DEFAULT
Definition: commctrl.h:1396
virtual HRESULT STDMETHODCALLTYPE AddBitmap(const GUID *pguidCmdGroup, long param10, long buttonCount, TBADDBITMAP *lParam, long *newIndex, COLORREF param20)
DWORD LCID
Definition: nls.h:13
UINT_PTR WPARAM
Definition: windef.h:207
virtual HRESULT STDMETHODCALLTYPE SendToolbarMsg(const GUID *pguidCmdGroup, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *result)
#define WS_CHILD
Definition: pedump.c:617
DWORD WINAPI GetMessagePos(void)
Definition: message.c:1350
HRESULT WINAPI SHBindToFolder(LPCITEMIDLIST path, IShellFolder **newFolder)
#define ITID_TEXTLABELS
Definition: undocshell.h:771
LONG left
Definition: windef.h:291
#define SWP_NOZORDER
Definition: winuser.h:1232
#define WS_CLIPCHILDREN
Definition: pedump.c:619
static LPOLESTR
Definition: stg_prop.c:27
LONG right
Definition: windef.h:293
#define IDM_TOOLBARS_TEXTLABELS
Definition: resource.h:35
#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
BOOL WINAPI DestroyWindow(_In_ HWND)
#define RBBIM_LPARAM
Definition: commctrl.h:1484
#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)
LRESULT OnContextMenu(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
int32_t INT
Definition: typedefs.h:56
virtual HRESULT STDMETHODCALLTYPE Unknown1()
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1448
WPARAM wParam
Definition: combotst.c:138
CComPtr< IUnknown > fLogoBar
#define IDC_SIZENS
Definition: winuser.h:690
#define V_I4(A)
Definition: oleauto.h:247
#define RBS_BANDBORDERS
Definition: commctrl.h:1444
BOOL WINAPI AppendMenuW(_In_ HMENU, _In_ UINT, _In_ UINT_PTR, _In_opt_ LPCWSTR)
#define ITBBID_MENUBAND
Definition: undocshell.h:763
#define IDM_GOTO_BACK
Definition: resource.h:45
virtual HRESULT STDMETHODCALLTYPE GetClassID(CLSID *pClassID)
virtual HRESULT STDMETHODCALLTYPE Load(IStream *pStm)
#define REBARCLASSNAMEW
Definition: commctrl.h:1435
CComPtr< CMenuCallback > fMenuCallback
int WINAPI GetDlgCtrlID(_In_ HWND)
HRESULT IUnknown_RelayWinEvent(IUnknown *punk, HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
virtual HRESULT STDMETHODCALLTYPE GetSizeMax(ULARGE_INTEGER *pcbSize)
_In_ PSID _Out_writes_to_opt_ cchName LPSTR _Inout_ LPDWORD cchName
Definition: winbase.h:2706
CComPtr< IUnknown > fContainedBand
#define RBBIM_STYLE
Definition: commctrl.h:1474
#define CCS_NODIVIDER
Definition: commctrl.h:2220
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
#define TPM_RIGHTBUTTON
Definition: winuser.h:2334
HRESULT LockUnlockToolbars(bool locked)
virtual HRESULT STDMETHODCALLTYPE GetState(const GUID *pguidCmdGroup, long commandID, long *theState)
#define CSIDL_FAVORITES
Definition: shlobj.h:2009
GLenum const GLfloat * params
Definition: glext.h:5645
CComPtr< IUnknown > fControlsBar
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:90
LRESULT OnLDown(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
unsigned int BOOL
Definition: ntddk_ex.h:94
#define RB_GETBANDCOUNT
Definition: commctrl.h:1557
long LONG
Definition: pedump.c:60
virtual HRESULT STDMETHODCALLTYPE UIActivateIO(BOOL fActivate, LPMSG lpMsg)
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:512
static const struct bandInfoStruct bandInfo[9]
Definition: layer3.c:95
UINT_PTR idFrom
Definition: winuser.h:3111
HRESULT ReserveBorderSpace(LONG maxHeight=-1)
#define TPM_TOPALIGN
Definition: winuser.h:2337
HRESULT WINAPI IUnknown_SetSite(IUnknown *obj, IUnknown *site)
Definition: ordinal.c:1358
static HRESULT BindToDesktop(LPCITEMIDLIST pidl, IShellFolder **ppsfResult)
#define TTF_IDISHWND
Definition: commctrl.h:1736
#define ITID_TOOLBARLOCKED
Definition: undocshell.h:778
HRESULT STDMETHODCALLTYPE GetObject(LPSMDATA psmd, REFIID riid, void **ppvObject)
#define CreateWindowEx
Definition: winuser.h:5621
#define S_FALSE
Definition: winerror.h:2357
HRESULT SetState(const GUID *pguidCmdGroup, long commandID, OLECMD *pcmd)
#define E_INVALIDARG
Definition: ddrawi.h:101
#define DISPID_NAVIGATECOMPLETE2
Definition: webchild.h:54
virtual HRESULT STDMETHODCALLTYPE OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
static const int gFoldersCommandID
#define MAKELONG(a, b)
Definition: typedefs.h:248
#define IDM_TOOLBARS_GOBUTTON
Definition: resource.h:36
smooth NULL
Definition: ftsmooth.c:416
#define MF_SEPARATOR
Definition: winuser.h:137
LONG_PTR LPARAM
Definition: windef.h:208
#define CCS_TOP
Definition: commctrl.h:2214
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2218
static HRESULT GetFavoritesFolder(IShellFolder **ppsfFavorites, LPITEMIDLIST *ppidl)
virtual HRESULT STDMETHODCALLTYPE TranslateAcceleratorIO(LPMSG lpMsg)
#define SMC_EXEC
Definition: undocshell.h:611
#define RB_INSERTBANDW
Definition: commctrl.h:1555
#define CMergedFolder_CreateInstance
Definition: shellmenu.h:93
GLuint index
Definition: glext.h:6031
#define RBBS_HIDETITLE
#define WS_EX_LEFT
Definition: winuser.h:391
#define CGID_MenuBand
#define RBBS_VARIABLEHEIGHT
Definition: commctrl.h:1467
virtual ~CMenuCallback()
#define TLOG_FORE
Definition: shlobj.h:2493
HRESULT IUnknown_CloseDW(IUnknown *punk, DWORD dwReserved)
#define V_INTREF(A)
Definition: oleauto.h:252
virtual HRESULT STDMETHODCALLTYPE Save(IStream *pStm, BOOL fClearDirty)
virtual HRESULT STDMETHODCALLTYPE GetBitmapSize(long *paramC)
#define RBBIM_COLORS
Definition: commctrl.h:1475
HRESULT CBrandBand_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:51
IShellFolder * psf
Definition: shobjidl.idl:2625
#define KEY_WRITE
Definition: nt_native.h:1031
#define TLMENUF_BACK
Definition: shlobj.h:2497
#define RBS_AUTOSIZE
Definition: commctrl.h:1447
#define BEGIN_COM_MAP(x)
Definition: atlcom.h:541
char TCHAR
Definition: xmlstorage.h:189
#define ITBBID_TOOLSBAND
Definition: undocshell.h:765
MmuTrapHandler callback[0x30]
Definition: mmuobject.c:44
#define _T(x)
Definition: vfdio.h:22
#define TRACE(s)
Definition: solgame.cpp:4
HRESULT WINAPI AtlUnadvise(IUnknown *pUnkCP, const IID *iid, DWORD dw)
Definition: atl.c:74
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
#define RBBIM_TEXT
Definition: commctrl.h:1476
LRESULT OnTipText(UINT idControl, NMHDR *pNMHDR, BOOL &bHandled)
virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
HRESULT IUnknown_ShowDW(IUnknown *punk, BOOL fShow)
if(!(yy_init))
Definition: macro.lex.yy.c:714
LRESULT OnFolders(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:2687
LONG HRESULT
Definition: typedefs.h:77
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define ITBBID_BRANDBAND
Definition: undocshell.h:764
#define SWP_NOACTIVATE
Definition: winuser.h:1227
DWORD COLORREF
Definition: windef.h:285
virtual HRESULT STDMETHODCALLTYPE QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText)
#define FAILED_UNEXPECTEDLY(hr)
Definition: shellutils.h:35
#define WINAPI
Definition: msvc.h:8
virtual HRESULT STDMETHODCALLTYPE EnumBands(UINT uBand, DWORD *pdwBandID)
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
#define V_BOOL(A)
Definition: oleauto.h:224
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned long DWORD
Definition: ntddk_ex.h:95
LRESULT OnForwardToCommandTarget(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
CComPtr< IUnknown > fSite
#define ITBBID_ADDRESSBAND
Definition: undocshell.h:766
virtual HRESULT STDMETHODCALLTYPE AddBand(IUnknown *punk)
#define SIZE_MINIMIZED
Definition: winuser.h:2460
#define RBBS_FIXEDSIZE
Definition: commctrl.h:1462
#define RBBIM_CHILDSIZE
Definition: commctrl.h:1479
#define RB_SETBANDINFOW
Definition: commctrl.h:1556
virtual HRESULT STDMETHODCALLTYPE RemoveBand(DWORD dwBandID)
GLbitfield flags
Definition: glext.h:7161
HRESULT Initialize(IUnknown *containedBand, CInternetToolbar *browser, HWND hwnd, int bandID, int flags)
virtual HRESULT STDMETHODCALLTYPE OnChange(LONG lEvent, LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
HRESULT CAddressBand_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:24
#define DISPID_BEFORENAVIGATE
Definition: webchild.h:35
#define ITID_MENUBANDSHOWN
Definition: undocshell.h:775
#define index(s, c)
Definition: various.h:29
HRESULT WINAPI IUnknown_HasFocusIO(IUnknown *lpUnknown)
Definition: ordinal.c:4136
LRESULT OnCommand(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
static const WCHAR L[]
Definition: oid.c:1250
#define DISPID_DOWNLOADBEGIN
Definition: webchild.h:41
#define V_VT(A)
Definition: oleauto.h:211
static int state
Definition: maze.c:121
CComPtr< IUnknown > fNavigationBar
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode)
static const int gViewsCommandID
HANDLE lEvent
Definition: tftpd.cpp:56
LRESULT OnUpLevel(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
CComPtr< IOleCommandTarget > fCommandTarget
virtual HRESULT STDMETHODCALLTYPE RequestBorderSpaceDW(IUnknown *punkObj, LPCBORDERWIDTHS pbw)
#define RBBS_USECHEVRON
Definition: commctrl.h:1470
REFIID LPVOID * ppvObject
Definition: precomp.h:44
#define RB_HITTEST
Definition: commctrl.h:1553
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
#define WM_COMMAND
Definition: winuser.h:1716
#define RBBS_FIXEDBMP
Definition: commctrl.h:1466
HWND hwndFrom
Definition: winuser.h:3110
DWORD WINAPI SHCheckMenuItem(HMENU hMenu, UINT uID, BOOL bCheck)
Definition: ordinal.c:1747
LRESULT OnSetCursor(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
CInternetToolbar * fToolbar
virtual HRESULT STDMETHODCALLTYPE ModifyButton(const GUID *pguidCmdGroup, long param10, long param14)
#define LoadCursor
Definition: winuser.h:5678
BOOL WINAPI DestroyMenu(_In_ HMENU)
virtual HRESULT STDMETHODCALLTYPE GetButton(const GUID *pguidCmdGroup, long param10, long param14)
#define RBSTR_CHANGERECT
Definition: commctrl.h:1568
#define IDM_TOOLBARS_LOCKTOOLBARS
Definition: resource.h:33
#define ITID_ADDRESSBANDSHOWN
Definition: undocshell.h:773
#define TOOLTIPTEXTW
Definition: commctrl.h:1856
#define SWP_NOSIZE
Definition: winuser.h:1230
_In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon.h:519
#define WS_EX_RIGHTSCROLLBAR
Definition: winuser.h:401
struct stdole::EXCEPINFO EXCEPINFO
LRESULT OnMenuDropDown(UINT idControl, NMHDR *pNMHDR, BOOL &bHandled)
HWND WINAPI SetCapture(_In_ HWND hWnd)
static VARIANTARG static DISPID
Definition: ordinal.c:49
#define S_OK
Definition: intsafe.h:59
virtual HRESULT STDMETHODCALLTYPE ShowDW(BOOL fShow)
#define WS_BORDER
Definition: pedump.c:625
#define TB_GETSTATE
Definition: commctrl.h:1027
void AddDockItem(IUnknown *newItem, int bandID, int flags)
#define IDM_TOOLBARS_STANDARDBUTTONS
Definition: resource.h:30
virtual HRESULT STDMETHODCALLTYPE OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus)
_CRTIMP wchar_t *__cdecl wcsncpy(wchar_t *_Dest, const wchar_t *_Source, size_t _Count)
#define TBSTATE_CHECKED
Definition: commctrl.h:944
LRESULT OnTravelBack(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
#define RBBS_HIDDEN
Definition: commctrl.h:1464
#define LoadMenu
Definition: winuser.h:5683
virtual ~CInternetToolbar()
CComPtr< IBandProxy > fBandProxy
HWND buttons[5]
Definition: sndrec32.cpp:40
HRESULT WINAPI IUnknown_TranslateAcceleratorIO(IUnknown *lpUnknown, LPMSG lpMsg)
Definition: ordinal.c:4104
HCURSOR WINAPI SetCursor(_In_opt_ HCURSOR)
virtual HRESULT STDMETHODCALLTYPE QueryService(REFGUID guidService, REFIID riid, void **ppvObject)
#define CMenuBand_CreateInstance
Definition: shellmenu.h:81
virtual HRESULT STDMETHODCALLTYPE IsDirty()
#define IDM_TOOLBARS_CUSTOMIZE
Definition: resource.h:34
virtual HRESULT STDMETHODCALLTYPE GetWindow(HWND *lphwnd)
#define COM_INTERFACE_ENTRY_IID(iid, x)
Definition: atlcom.h:561
#define long
Definition: qsort.c:33
virtual HRESULT STDMETHODCALLTYPE SetSite(IUnknown *pUnkSite)
CComPtr< IShellMenu > fMenuBar
void Release()
Definition: atlcomcli.h:140
#define E_NOTIMPL
Definition: ddrawi.h:99
Definition: services.c:325
CComPtr< IShellMenu > fFavoritesMenu
HRESULT ToggleBandVisibility(int BandID)
#define RB_IDTOINDEX
Definition: commctrl.h:1560
HRESULT GetRBBandInfo(REBARBANDINFOW &bandInfo)
unsigned int * PULONG
Definition: retypes.h:1
UINT WINAPI SHEnableMenuItem(HMENU hMenu, UINT wItemID, BOOL bEnable)
Definition: ordinal.c:1728
#define IDM_EXPLORERBAR_HISTORY
Definition: resource.h:42
unsigned int UINT
Definition: ndis.h:50
LRESULT OnNotify(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
#define MK_CONTROL
Definition: winuser.h:2324
static char * textBuffer
Definition: combo.c:52
#define ITID_AUTOHIDEENABLED
Definition: undocshell.h:776
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
#define FCIDM_MENU_FAVORITES
Definition: shlobj.h:557
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:275
#define RBBS_GRIPPERALWAYS
Definition: commctrl.h:1468
#define CLR_DEFAULT
Definition: commctrl.h:305
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:846
int command(const char *fmt,...)
Definition: ftp.c:266
virtual HRESULT STDMETHODCALLTYPE SetBandState(DWORD dwBandID, DWORD dwMask, DWORD dwState)
BOOL WINAPI ReleaseCapture(void)
Definition: message.c:2888
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define SendMessage
Definition: winuser.h:5709
#define TBSTATE_ENABLED
Definition: commctrl.h:946
struct stdole::DISPPARAMS DISPPARAMS
#define RBBS_NOGRIPPER
Definition: commctrl.h:1469
HRESULT CreateMenuBar(IShellMenu **menuBar)
const GUID IID_IOleWindow
LRESULT OnMouseMove(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
#define HIWORD(l)
Definition: typedefs.h:246
unsigned int ULONG
Definition: retypes.h:1
#define ITID_TOOLBARBANDSHOWN
Definition: undocshell.h:772
virtual HRESULT STDMETHODCALLTYPE GetBandSiteInfo(BANDSITEINFO *pbsinfo)
#define UNIMPLEMENTED
Definition: debug.h:114
LONG bottom
Definition: windef.h:294
#define RBS_DBLCLKTOGGLE
Definition: commctrl.h:1449
HRESULT CreateAndInitBandProxy()
HRESULT WINAPI IUnknown_QueryStatus(IUnknown *lpUnknown, REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
Definition: ordinal.c:995
#define SWP_NOMOVE
Definition: winuser.h:1229
virtual HRESULT STDMETHODCALLTYPE Invoke(DISPID dispIdMember, REFIID riid, LCID lcid, WORD wFlags, DISPPARAMS *pDispParams, VARIANT *pVarResult, EXCEPINFO *pExcepInfo, UINT *puArgErr)
virtual HRESULT STDMETHODCALLTYPE GetTypeInfoCount(UINT *pctinfo)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define ITID_CUSTOMIZEENABLED
Definition: undocshell.h:777
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
HWND WINAPI SHCreateWorkerWindowW(WNDPROC wndProc, HWND hWndParent, DWORD dwExStyle, DWORD dwStyle, HMENU hMenu, LONG_PTR wnd_extra)
Definition: ordinal.c:2872
#define TLMENUF_FORE
Definition: shlobj.h:2498
#define END_COM_MAP()
Definition: atlcom.h:552
#define HTCLIENT
Definition: winuser.h:2429
HRESULT CommandStateChanged(bool newValue, int commandID)
T * Detach()
Definition: atlcomcli.h:156
#define SID_SShellBrowser
Definition: shlguid.h:125
WCHAR * LPWSTR
Definition: xmlstorage.h:184
virtual HRESULT STDMETHODCALLTYPE GetBandObject(DWORD dwBandID, REFIID riid, void **ppv)
BOOL WINAPI ScreenToClient(_In_ HWND, _Inout_ LPPOINT)
LONG_PTR LRESULT
Definition: windef.h:209
virtual HRESULT STDMETHODCALLTYPE GetBorderDW(IUnknown *punkObj, LPRECT prcBorder)
#define E_POINTER
Definition: winerror.h:2365
STRSAFEAPI StringCbCopyW(STRSAFE_LPWSTR pszDest, size_t cbDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:166
Arabic default style
Definition: afstyles.h:93
LRESULT OnSearch(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
struct tagREBARBANDINFOW REBARBANDINFOW
#define WS_VISIBLE
Definition: pedump.c:620
GLuint64EXT * result
Definition: glext.h:11304
#define memset(x, y, z)
Definition: compat.h:39
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
virtual HRESULT STDMETHODCALLTYPE ContextSensitiveHelp(BOOL fEnterMode)
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
SMDM_TOOLBAR struct tagSMINFO SMINFO
virtual HRESULT STDMETHODCALLTYPE GetNameSpaceID(LPCITEMIDLIST, LPGUID)=0
virtual HRESULT STDMETHODCALLTYPE Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
LPARAM lParam
Definition: combotst.c:139
BOOL WINAPI TrackPopupMenu(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _Reserved_ int, _In_ HWND, _Reserved_ LPCRECT)
#define LOWORD(l)
Definition: pedump.c:82
virtual HRESULT STDMETHODCALLTYPE HasFocusIO()
LRESULT OnTravelForward(WORD wNotifyCode, WORD wID, HWND hWndCtl, BOOL &bHandled)
#define RegCreateKeyEx
Definition: winreg.h:501
#define RBBIM_IDEALSIZE
Definition: commctrl.h:1483
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:90
virtual HRESULT STDMETHODCALLTYPE SetBorderSpaceDW(IUnknown *punkObj, LPCBORDERWIDTHS pbw)
void Attach(T *lp)
Definition: atlcomcli.h:149
virtual HRESULT STDMETHODCALLTYPE SetImageList(const GUID *pguidCmdGroup, HIMAGELIST param10, HIMAGELIST param14, HIMAGELIST param18)
virtual HRESULT STDMETHODCALLTYPE GetIDsOfNames(REFIID riid, LPOLESTR *rgszNames, UINT cNames, LCID lcid, DISPID *rgDispId)
#define RBS_REGISTERDROP
Definition: commctrl.h:1446
unsigned int(__cdecl typeof(jpeg_read_scanlines))(struct jpeg_decompress_struct *
Definition: typeof.h:31
#define SWP_NOOWNERZORDER
Definition: winuser.h:1234
HRESULT CToolsBand_CreateInstance(REFIID riid, void **ppv)
Definition: toolsband.cpp:419
LRESULT OnLUp(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
virtual HRESULT STDMETHODCALLTYPE QueryNameSpace(ULONG, LPGUID, IShellFolder **)=0
virtual HRESULT STDMETHODCALLTYPE GetSite(REFIID riid, void **ppvSite)
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1034