ReactOS 0.4.16-dev-980-g00983aa
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/*
22Implements 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/*
31TODO:
32****Add tooltip notify handler
33 **Properly implement GetBandInfo
34 Implement Exec
35 Implement QueryService
36 Implement Load
37 Implement Save
38*/
39
40// Unique GUID of the DLL where this CAddressBand is implemented so we can tell if it's really us
41static const GUID THISMODULE_GUID = { 0x60ebab6e, 0x2e4b, 0x42f6, { 0x8a,0xbc,0x80,0x73,0x1c,0xa6,0x42,0x02} };
42
44{
48 fGoButtonShown = false;
49}
50
52{
53}
54
56{
57 return SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton", FALSE, TRUE);
58}
59
61{
63 IUnknown_QueryService(pUnkBand, THISMODULE_GUID, IID_PPV_ARG(IAddressBand, &pAB));
64 if (pAB)
65 return static_cast<CAddressBand*>(pAB.p)->fGoButtonShown;
66 return ShouldShowGoButton(); // We don't know, return the global state
67}
68
70{
71// m_bFocus = bFocus;
72
73 //Inform the input object site that the focus has changed.
74 if (fSite)
75 {
76#if 0
77 fSite->OnFocusChangeIS((IDockingWindow *)this, bFocus);
78#endif
79 }
80}
81
83{
84 if (!m_hWnd || !pdbi) return E_FAIL; /* Verify window exists */
85 if (pdbi->dwMask & DBIM_MINSIZE)
86 {
88 pdbi->ptMinSize.x = 100;
89 else
90 pdbi->ptMinSize.x = 150;
91 pdbi->ptMinSize.y = 22;
92 }
93 if (pdbi->dwMask & DBIM_MAXSIZE)
94 {
95 pdbi->ptMaxSize.x = 0;
96 pdbi->ptMaxSize.y = 0;
97 }
98 if (pdbi->dwMask & DBIM_INTEGRAL)
99 {
100 pdbi->ptIntegral.x = 0;
101 pdbi->ptIntegral.y = 0;
102 }
103 if (pdbi->dwMask & DBIM_ACTUAL)
104 {
105 if (fGoButtonShown)
106 pdbi->ptActual.x = 100;
107 else
108 pdbi->ptActual.x = 150;
109 pdbi->ptActual.y = 22;
110 }
111 if (pdbi->dwMask & DBIM_TITLE)
112 {
113 if (!LoadStringW(_AtlBaseModule.GetResourceInstance(), IDS_ADDRESSBANDLABEL, pdbi->wszTitle, _countof(pdbi->wszTitle)))
115 }
116
117 if (pdbi->dwMask & DBIM_MODEFLAGS)
118 pdbi->dwModeFlags = DBIMF_UNDELETEABLE;
119 if (pdbi->dwMask & DBIM_BKCOLOR)
120 pdbi->crBkgnd = 0;
121 return S_OK;
122}
123
125{
126 CComPtr<IShellService> shellService;
127 HWND parentWindow;
128 HWND combobox;
129 HRESULT hResult;
130 IImageList *piml;
131
132 if (pUnkSite == NULL)
133 {
134 fSite.Release();
135 return S_OK;
136 }
137
138 fSite.Release();
139
140 hResult = pUnkSite->QueryInterface(IID_PPV_ARG(IDockingWindowSite, &fSite));
141 if (FAILED_UNEXPECTEDLY(hResult))
142 return hResult;
143
144 // get window handle of parent
145 parentWindow = NULL;
146 hResult = IUnknown_GetWindow(fSite, &parentWindow);
147
148 if (!::IsWindow(parentWindow))
149 return E_FAIL;
150
151 // create combo box ex
154 0, 0, 500, 250, parentWindow, (HMENU)IDM_TOOLBARS_ADDRESSBAR, _AtlBaseModule.GetModuleInstance(), 0);
155 if (combobox == NULL)
156 return E_FAIL;
157 SubclassWindow(combobox);
158
161 {
162 SendMessageW(combobox, CBEM_SETIMAGELIST, 0, 0);
163 }
164 else
165 {
166 SendMessageW(combobox, CBEM_SETIMAGELIST, 0, reinterpret_cast<LPARAM>(piml));
167 }
168
171
172 fEditControl = reinterpret_cast<HWND>(SendMessage(CBEM_GETEDITCONTROL, 0, 0));
173 fComboBox = reinterpret_cast<HWND>(SendMessage(CBEM_GETCOMBOCONTROL, 0, 0));
174 hResult = CAddressEditBox_CreateInstance(IID_PPV_ARG(IAddressEditBox, &fAddressEditBox));
175 if (FAILED_UNEXPECTEDLY(hResult))
176 return hResult;
177
178 hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IShellService, &shellService));
179 if (FAILED_UNEXPECTEDLY(hResult))
180 return hResult;
181 hResult = fAddressEditBox->Init(combobox, fEditControl, 8, fSite /*(IAddressBand *)this*/);
182 if (FAILED_UNEXPECTEDLY(hResult))
183 return hResult;
184 hResult = shellService->SetOwner(fSite);
185 if (FAILED_UNEXPECTEDLY(hResult))
186 return hResult;
187
189 if (fGoButtonShown)
191
192 return hResult;
193}
194
196{
197 if (fSite == NULL)
198 return E_FAIL;
199 return fSite->QueryInterface(riid, ppvSite);
200}
201
203{
204 if (lphwnd == NULL)
205 return E_POINTER;
206 *lphwnd = m_hWnd;
207 return S_OK;
208}
209
211{
212 return E_NOTIMPL;
213}
214
216{
217 ShowDW(FALSE);
218
219 if (IsWindow())
221
222 m_hWnd = NULL;
223
224 CComPtr<IShellService> pservice;
225 HRESULT hres = fAddressEditBox->QueryInterface(IID_PPV_ARG(IShellService, &pservice));
226 if (SUCCEEDED(hres ))
227 pservice->SetOwner(NULL);
228
230 if (fSite) fSite.Release();
231
232 if (m_himlNormal)
234
235 if (m_himlHot)
237
238 return S_OK;
239}
240
242 const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
243{
244 return E_NOTIMPL;
245}
246
248{
249 if (m_hWnd)
250 {
251 if (fShow)
253 else
255 }
256 return S_OK;
257}
258
260 const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText)
261{
262 return IUnknown_QueryStatus(fAddressEditBox, *pguidCmdGroup, cCmds, prgCmds, pCmdText);
263}
264
266 DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
267{
268 // incomplete
269 return E_NOTIMPL;
270}
271
273{
275 return S_OK;
276 return S_FALSE;
277}
278
279static WCHAR GetAccessKeyFromText(WCHAR chAccess, LPCWSTR pszText)
280{
281 for (const WCHAR *pch = pszText; *pch != UNICODE_NULL; ++pch)
282 {
283 if (*pch == L'&' && pch[1] == L'&')
284 {
285 /* Skip the first '&', the second is skipped by the for-loop */
286 ++pch;
287 continue;
288 }
289 if (*pch == L'&')
290 {
291 ++pch;
292 chAccess = *pch;
293 break;
294 }
295 }
296
297 ::CharUpperBuffW(&chAccess, 1);
298 return chAccess;
299}
300
302{
303 static WCHAR s_chCache = 0;
304 static LANGID s_ThreadLocale = 0;
305 if (s_chCache && s_ThreadLocale == ::GetThreadLocale())
306 return s_chCache;
307
308 WCHAR szText[80];
309 if (!LoadStringW(_AtlBaseModule.GetResourceInstance(), IDS_ADDRESSBANDLABEL,
310 szText, _countof(szText)))
311 {
312 return chAccess;
313 }
314
315 s_chCache = GetAccessKeyFromText(chAccess, szText);
316 s_ThreadLocale = ::GetThreadLocale();
317 return s_chCache;
318}
319
321{
322 // Enable Address bar access key (Alt+D)
323 switch (lpMsg->message)
324 {
325 case WM_SYSKEYDOWN:
326 case WM_SYSCHAR:
327 {
328 WCHAR chAccess = GetAddressBarAccessKey(L'D');
329 if (lpMsg->wParam == chAccess)
330 {
333 return S_FALSE;
334 }
335 break;
336 }
337 }
338
339 if (lpMsg->hwnd == fEditControl)
340 {
341 switch (lpMsg->message)
342 {
343 case WM_SYSKEYDOWN:
344 case WM_SYSKEYUP:
345 case WM_SYSCOMMAND:
346 case WM_SYSDEADCHAR:
347 case WM_SYSCHAR:
348 return S_FALSE;
349 }
350
351 TranslateMessage(lpMsg);
352 DispatchMessage(lpMsg);
353 return S_OK;
354 }
355 return S_FALSE;
356}
357
359{
360 if (fActivate)
361 {
362 IUnknown_OnFocusChangeIS(fSite, static_cast<IDeskBand *>(this), fActivate);
363 SetFocus();
364 }
365 return S_OK;
366}
367
369 HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
370{
371 CComPtr<IWinEventHandler> winEventHandler;
372 HRESULT hResult;
373 RECT rect;
374
375 if (theResult)
376 *theResult = 0;
377
378 switch (uMsg)
379 {
380 case WM_WININICHANGE:
381 break;
382 case WM_COMMAND:
384 {
385 fGoButtonShown = !IsGoButtonVisible(static_cast<IAddressBand*>(this));
386 SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton", REG_SZ, fGoButtonShown ? (LPVOID)L"yes" : (LPVOID)L"no", fGoButtonShown ? 8 : 6, SHREGSET_FORCE_HKCU);
387 if (!fGoButton)
391 SendMessage(m_hWnd,WM_SIZE,0,MAKELPARAM(rect.right-rect.left,rect.bottom-rect.top));
392 // broadcast change notification to all explorer windows
393 }
394 break;
395 }
396 hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IWinEventHandler, &winEventHandler));
397 if (FAILED_UNEXPECTEDLY(hResult))
398 return hResult;
399 return winEventHandler->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult);
400}
401
403{
404 CComPtr<IWinEventHandler> winEventHandler;
405 HRESULT hResult;
406
407 if (fAddressEditBox)
408 {
409 hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IWinEventHandler, &winEventHandler));
410 if (FAILED_UNEXPECTEDLY(hResult))
411 return hResult;
412 return winEventHandler->IsWindowOwner(hWnd);
413 }
414 return S_FALSE;
415}
416
418{
419 CComPtr<IAddressBand> addressBand;
420 HRESULT hResult;
421
422 hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IAddressBand, &addressBand));
423 if (FAILED_UNEXPECTEDLY(hResult))
424 return hResult;
425 return addressBand->FileSysChange(param8, paramC);
426}
427
429{
430 CComPtr<IAddressBand> addressBand;
431 HRESULT hResult;
432
433 hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IAddressBand, &addressBand));
434 if (FAILED_UNEXPECTEDLY(hResult))
435 return hResult;
436 return addressBand->Refresh(param8);
437}
438
440{
441 if (guidService == THISMODULE_GUID)
443 return E_NOTIMPL;
444}
445
447{
448 return E_NOTIMPL;
449}
450
452{
453 if (pClassID == NULL)
454 return E_POINTER;
455 *pClassID = CLSID_SH_AddressBand;
456 return S_OK;
457}
458
460{
461 return E_NOTIMPL;
462}
463
465{
466 // incomplete
467 return E_NOTIMPL;
468}
469
471{
472 // incomplete
473 return E_NOTIMPL;
474}
475
477{
478 // incomplete
479 return E_NOTIMPL;
480}
481
483{
484 if (notifyHeader->hwndFrom == fGoButton)
485 {
486 fAddressEditBox->Execute(0);
487 }
488 return 0;
489}
490
491LRESULT CAddressBand::OnTipText(UINT idControl, NMHDR *notifyHeader, BOOL &bHandled)
492{
493 if (notifyHeader->hwndFrom == fGoButton)
494 {
495 WCHAR szText[MAX_PATH];
496 WCHAR szFormat[MAX_PATH];
497 LPNMTBGETINFOTIP pGIT = (LPNMTBGETINFOTIP)notifyHeader;
498
499 if (::GetWindowTextW(fEditControl, szText, _countof(szText)))
500 {
501 LoadStringW(_AtlBaseModule.GetResourceInstance(), IDS_GOBUTTONTIPTEMPLATE, szFormat, _countof(szFormat));
502 wnsprintf(pGIT->pszText, pGIT->cchTextMax, szFormat, szText);
503 }
504 else
505 *pGIT->pszText = 0;
506 }
507 return 0;
508}
509
511{
512 POINT pt;
513 POINT ptOrig;
514 HWND parentWindow;
516
517 if (fGoButtonShown == false)
518 {
519 bHandled = FALSE;
520 return 0;
521 }
522 pt.x = 0;
523 pt.y = 0;
524 parentWindow = GetParent();
525 ::MapWindowPoints(m_hWnd, parentWindow, &pt, 1);
526 OffsetWindowOrgEx(reinterpret_cast<HDC>(wParam), pt.x, pt.y, &ptOrig);
527 result = SendMessage(parentWindow, WM_ERASEBKGND, wParam, 0);
528 SetWindowOrgEx(reinterpret_cast<HDC>(wParam), ptOrig.x, ptOrig.y, NULL);
529 if (result == 0)
530 {
531 bHandled = FALSE;
532 return 0;
533 }
534 return result;
535}
536
538{
539 RECT goButtonBounds;
540 RECT buttonBounds;
541 long buttonWidth;
542 long buttonHeight;
543 RECT comboBoxBounds;
544 long newHeight;
545 long newWidth;
546
547 if (fGoButtonShown == false)
548 {
549 bHandled = FALSE;
550 return 0;
551 }
552
553 newHeight = HIWORD(lParam);
554 newWidth = LOWORD(lParam);
555
556 if (!fGoButton)
558
559 SendMessage(fGoButton, TB_GETITEMRECT, 0, reinterpret_cast<LPARAM>(&buttonBounds));
560 buttonWidth = buttonBounds.right - buttonBounds.left;
561 buttonHeight = buttonBounds.bottom - buttonBounds.top;
562
563 DefWindowProc(WM_SIZE, wParam, MAKELONG(newWidth - buttonWidth - 2, newHeight));
564 ::GetWindowRect(fComboBox, &comboBoxBounds);
565 ::SetWindowPos(fGoButton, NULL, newWidth - buttonWidth, (comboBoxBounds.bottom - comboBoxBounds.top - buttonHeight) / 2,
566 buttonWidth, buttonHeight, SWP_NOOWNERZORDER | SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER);
567
568 goButtonBounds.left = newWidth - buttonWidth;
569 goButtonBounds.top = 0;
570 goButtonBounds.right = newWidth - buttonWidth;
571 goButtonBounds.bottom = newHeight;
572 InvalidateRect(&goButtonBounds, TRUE);
573
575 return 0;
576}
577
579{
580 RECT goButtonBounds;
581 RECT buttonBounds;
582 long buttonWidth;
583 long buttonHeight;
584 RECT comboBoxBounds;
585 WINDOWPOS positionInfoCopy;
586 long newHeight;
587 long newWidth;
588
589 if (!fGoButtonShown)
590 {
591 bHandled = FALSE;
592 return 0;
593 }
594
595 if (!fGoButton)
597
598 positionInfoCopy = *reinterpret_cast<WINDOWPOS *>(lParam);
599 newHeight = positionInfoCopy.cy;
600 newWidth = positionInfoCopy.cx;
601
602 SendMessage(fGoButton, TB_GETITEMRECT, 0, reinterpret_cast<LPARAM>(&buttonBounds));
603
604 buttonWidth = buttonBounds.right - buttonBounds.left;
605 buttonHeight = buttonBounds.bottom - buttonBounds.top;
606 positionInfoCopy.cx = newWidth - 2 - buttonWidth;
607 DefWindowProc(WM_WINDOWPOSCHANGING, wParam, reinterpret_cast<LPARAM>(&positionInfoCopy));
608 ::GetWindowRect(fComboBox, &comboBoxBounds);
609 ::SetWindowPos(fGoButton, NULL, newWidth - buttonWidth, (comboBoxBounds.bottom - comboBoxBounds.top - buttonHeight) / 2,
610 buttonWidth, buttonHeight, SWP_NOOWNERZORDER | SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER);
611
612 goButtonBounds.left = newWidth - buttonWidth;
613 goButtonBounds.top = 0;
614 goButtonBounds.right = newWidth - buttonWidth;
615 goButtonBounds.bottom = newHeight;
616 InvalidateRect(&goButtonBounds, TRUE);
617
619 return 0;
620}
621
623{
624 const TBBUTTON buttonInfo [] = { { 0, 1, TBSTATE_ENABLED, 0 } };
625 HINSTANCE shellInstance;
626
627 shellInstance = _AtlBaseModule.GetResourceInstance();
629 20, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
631 20, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
632
636 0, 0, 0, 0, m_hWnd, NULL, _AtlBaseModule.GetModuleInstance(), NULL);
639 if (m_himlNormal)
641 if (m_himlHot)
644 reinterpret_cast<WPARAM>(_AtlBaseModule.GetResourceInstance()), IDS_GOBUTTONLABEL);
645 SendMessage(fGoButton, TB_ADDBUTTONSW, 1, (LPARAM) &buttonInfo);
646}
static WCHAR GetAddressBarAccessKey(WCHAR chAccess)
static WCHAR GetAccessKeyFromText(WCHAR chAccess, LPCWSTR pszText)
static const GUID THISMODULE_GUID
Definition: addressband.cpp:41
HWND hWnd
Definition: settings.c:17
#define STDMETHODCALLTYPE
Definition: bdasup.h:9
HRESULT CAddressEditBox_CreateInstance(REFIID riid, void **ppv)
Definition: browseui.cpp:33
void Release()
Definition: atlcomcli.h:170
HIMAGELIST m_himlHot
Definition: addressband.h:45
STDMETHOD() GetClassID(CLSID *pClassID) override
STDMETHOD() OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult) override
STDMETHOD() HasFocusIO() override
STDMETHOD() IsDirty() override
STDMETHOD() Refresh(long param8) override
LRESULT OnEraseBackground(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
STDMETHOD() SetSite(IUnknown *pUnkSite) override
LRESULT OnTipText(UINT idControl, NMHDR *notifyHeader, BOOL &bHandled)
STDMETHOD() TranslateAcceleratorIO(LPMSG lpMsg) override
STDMETHOD() Save(IStream *pStm, BOOL fClearDirty) override
STDMETHOD() GetBandInfo(DWORD dwBandID, DWORD dwViewMode, DESKBANDINFO *pdbi) override
Definition: addressband.cpp:82
CComPtr< IAddressEditBox > fAddressEditBox
Definition: addressband.h:39
STDMETHOD() ShowDW(BOOL fShow) override
STDMETHOD() IsWindowOwner(HWND hWnd) override
STDMETHOD() FileSysChange(long param8, long paramC) override
static BOOL IsGoButtonVisible(IUnknown *pUnkBand)
Definition: addressband.cpp:60
STDMETHOD() QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[], OLECMDTEXT *pCmdText) override
bool fGoButtonShown
Definition: addressband.h:43
HWND fEditControl
Definition: addressband.h:40
STDMETHOD() GetSizeMax(ULARGE_INTEGER *pcbSize) override
HWND fGoButton
Definition: addressband.h:41
LRESULT OnWindowPosChanging(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
LRESULT OnSize(UINT uMsg, WPARAM wParam, LPARAM lParam, BOOL &bHandled)
void FocusChange(BOOL bFocus)
Definition: addressband.cpp:69
STDMETHOD() OnFocusChangeIS(IUnknown *punkObj, BOOL fSetFocus) override
LRESULT OnNotifyClick(WPARAM wParam, NMHDR *notifyHeader, BOOL &bHandled)
STDMETHOD() QueryService(REFGUID guidService, REFIID riid, void **ppvObject) override
virtual ~CAddressBand()
Definition: addressband.cpp:51
STDMETHOD() ContextSensitiveHelp(BOOL fEnterMode) override
STDMETHOD() ResizeBorderDW(const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved) override
STDMETHOD() GetSite(REFIID riid, void **ppvSite) override
CComPtr< IDockingWindowSite > fSite
Definition: addressband.h:38
STDMETHOD() Load(IStream *pStm) override
STDMETHOD() Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut) override
void CreateGoButton()
HWND fComboBox
Definition: addressband.h:42
STDMETHOD() UIActivateIO(BOOL fActivate, LPMSG lpMsg) override
STDMETHOD() CloseDW(DWORD dwReserved) override
HIMAGELIST m_himlNormal
Definition: addressband.h:44
STDMETHOD() GetWindow(HWND *lphwnd) override
static BOOL ShouldShowGoButton()
Definition: addressband.cpp:55
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
#define IDS_GOBUTTONTIPTEMPLATE
Definition: resource.h:125
#define IDM_TOOLBARS_GOBUTTON
Definition: resource.h:37
#define IDS_GOBUTTONLABEL
Definition: resource.h:124
#define IDS_ADDRESSBANDLABEL
Definition: resource.h:128
#define IDM_TOOLBARS_ADDRESSBAR
Definition: resource.h:32
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:941
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
Definition: imagelist.c:2226
#define MAX_PATH
Definition: compat.h:34
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
LCID WINAPI GetThreadLocale(void)
Definition: locale.c:2801
HRESULT WINAPI IUnknown_QueryStatus(IUnknown *lpUnknown, REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
Definition: ordinal.c:1048
HRESULT WINAPI IUnknown_QueryService(IUnknown *, REFGUID, REFIID, LPVOID *)
Definition: ordinal.c:1501
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1336
HRESULT WINAPI IUnknown_OnFocusChangeIS(LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
Definition: ordinal.c:4804
LONG WINAPI SHRegSetUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, DWORD dwType, LPVOID pvData, DWORD cbData, DWORD dwFlags)
Definition: reg.c:673
BOOL WINAPI SHRegGetBoolUSValueW(LPCWSTR pszSubKey, LPCWSTR pszValue, BOOL fIgnoreHKCU, BOOL fDefault)
Definition: reg.c:770
#define pt(x, y)
Definition: drawing.c:79
#define RGB(r, g, b)
Definition: precomp.h:71
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint64EXT * result
Definition: glext.h:11304
REFIID riid
Definition: atlbase.h:39
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define REG_SZ
Definition: layer.c:22
USHORT LANGID
Definition: mui.h:9
#define pch(ap)
Definition: match.c:418
static HDC
Definition: imagelist.c:88
HRESULT hres
Definition: protocol.c:465
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
_In_ HANDLE _In_ DWORD _In_ DWORD _Inout_opt_ LPOVERLAPPED _In_opt_ LPTRANSMIT_FILE_BUFFERS _In_ DWORD dwReserved
Definition: mswsock.h:95
unsigned int UINT
Definition: ndis.h:50
#define UNICODE_NULL
#define L(x)
Definition: ntvdm.h:50
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
#define WS_TABSTOP
Definition: pedump.c:634
#define WS_VISIBLE
Definition: pedump.c:620
#define WS_CLIPSIBLINGS
Definition: pedump.c:618
#define WS_CLIPCHILDREN
Definition: pedump.c:619
#define TBSTYLE_TOOLTIPS
Definition: commctrl.h:989
#define TBSTYLE_LIST
Definition: commctrl.h:993
#define CBEM_GETCOMBOCONTROL
Definition: commctrl.h:3837
#define TB_BUTTONSTRUCTSIZE
Definition: commctrl.h:1134
#define WC_COMBOBOXEXW
Definition: commctrl.h:3786
#define TB_ADDSTRINGW
Definition: commctrl.h:1132
#define TB_SETIMAGELIST
Definition: commctrl.h:1150
#define CCS_NODIVIDER
Definition: commctrl.h:2253
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:943
#define CBEM_SETEXTENDEDSTYLE
Definition: commctrl.h:3840
#define TB_GETITEMRECT
Definition: commctrl.h:1133
#define CBEM_SETIMAGELIST
Definition: commctrl.h:3832
#define TBSTATE_ENABLED
Definition: commctrl.h:974
#define CBES_EX_NOSIZELIMIT
Definition: commctrl.h:3859
#define TBSTYLE_FLAT
Definition: commctrl.h:992
#define CBES_EX_CASESENSITIVE
Definition: commctrl.h:3860
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2251
#define CCS_NORESIZE
Definition: commctrl.h:2250
#define TB_SETHOTIMAGELIST
Definition: commctrl.h:1154
#define TB_ADDBUTTONSW
Definition: commctrl.h:1266
#define CCS_NOMOVEY
Definition: commctrl.h:2248
#define TB_SETMAXTEXTROWS
Definition: commctrl.h:1162
#define LPNMTBGETINFOTIP
Definition: commctrl.h:1394
#define CBEM_GETEDITCONTROL
Definition: commctrl.h:3838
#define REFIID
Definition: guiddef.h:118
#define DefWindowProc
Definition: ros2win.h:31
#define SHIL_SMALL
Definition: shellapi.h:186
HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv)
Definition: shellord.c:2674
HRESULT hr
Definition: shlfolder.c:183
#define SHREGSET_FORCE_HKCU
Definition: shlwapi.h:321
#define wnsprintf
Definition: shlwapi.h:1736
#define _countof(array)
Definition: sndvol32.h:70
& rect
Definition: startmenu.cpp:1413
Definition: scsiwmi.h:51
LONG y
Definition: windef.h:330
LONG x
Definition: windef.h:329
COLORREF crBkgnd
Definition: shobjidl.idl:2500
WCHAR wszTitle[256]
Definition: shobjidl.idl:2498
UINT message
Definition: winuser.h:3126
HWND hwnd
Definition: winuser.h:3125
WPARAM wParam
Definition: winuser.h:3127
HWND hwndFrom
Definition: winuser.h:3168
long y
Definition: polytest.cpp:48
long x
Definition: polytest.cpp:48
LONG right
Definition: windef.h:308
LONG bottom
Definition: windef.h:309
LONG top
Definition: windef.h:307
LONG left
Definition: windef.h:306
#define MAKELONG(a, b)
Definition: typedefs.h:249
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
#define IDB_GOBUTTON_NORMAL
Definition: undocshell.h:889
#define IDB_GOBUTTON_HOT
Definition: undocshell.h:890
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1394
DWORD WINAPI GetLastError(void)
Definition: except.c:1042
_In_ void _In_ PCCERT_CONTEXT _In_opt_ LPFILETIME _In_ DWORD _In_ DWORD _Outptr_opt_ void ** ppvObject
Definition: wincrypt.h:6082
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define SubclassWindow(hwnd, lpfn)
Definition: windowsx.h:542
#define S_FALSE
Definition: winerror.h:2357
#define HRESULT_FROM_WIN32(x)
Definition: winerror.h:92
#define E_POINTER
Definition: winerror.h:2365
BOOL WINAPI SetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
Definition: coord.c:532
BOOL WINAPI OffsetWindowOrgEx(_In_ HDC, _In_ int, _In_ int, _Out_opt_ LPPOINT)
Definition: coord.c:912
HWND WINAPI GetFocus(void)
Definition: window.c:1875
#define CBS_OWNERDRAWFIXED
Definition: winuser.h:289
#define WM_ERASEBKGND
Definition: winuser.h:1636
#define CreateWindowEx
Definition: winuser.h:5775
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define SW_HIDE
Definition: winuser.h:779
#define CB_SETDROPPEDWIDTH
Definition: winuser.h:1973
#define SWP_NOACTIVATE
Definition: winuser.h:1253
#define WM_SYSCOMMAND
Definition: winuser.h:1752
#define IMAGE_BITMAP
Definition: winuser.h:211
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define MAKELPARAM(l, h)
Definition: winuser.h:4019
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI PostMessageW(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define WM_WINDOWPOSCHANGING
Definition: winuser.h:1672
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
int WINAPI LoadStringW(_In_opt_ HINSTANCE hInstance, _In_ UINT uID, _Out_writes_to_(cchBufferMax, return+1) LPWSTR lpBuffer, _In_ int cchBufferMax)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define WM_SIZE
Definition: winuser.h:1622
#define LR_CREATEDIBSECTION
Definition: winuser.h:1109
#define WM_COMMAND
Definition: winuser.h:1751
#define WM_WININICHANGE
Definition: winuser.h:1641
#define WS_EX_TOOLWINDOW
Definition: winuser.h:404
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define WM_SYSCHAR
Definition: winuser.h:1732
#define WM_SYSDEADCHAR
Definition: winuser.h:1733
HWND WINAPI SetFocus(_In_opt_ HWND)
#define SWP_SHOWWINDOW
Definition: winuser.h:1259
#define SendMessage
Definition: winuser.h:5863
#define WM_SYSKEYUP
Definition: winuser.h:1731
#define EM_SETSEL
Definition: winuser.h:2029
DWORD WINAPI CharUpperBuffW(_Inout_updates_(cchLength) LPWSTR lpsz, _In_ DWORD cchLength)
#define CB_GETDROPPEDSTATE
Definition: winuser.h:1956
HWND WINAPI GetParent(_In_ HWND)
#define SWP_NOOWNERZORDER
Definition: winuser.h:1260
#define SW_SHOW
Definition: winuser.h:786
#define DispatchMessage
Definition: winuser.h:5785
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define SWP_NOZORDER
Definition: winuser.h:1258
BOOL WINAPI DestroyWindow(_In_ HWND)
#define WM_SYSKEYDOWN
Definition: winuser.h:1730
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IID_PPV_ARG(Itype, ppType)
__wchar_t WCHAR
Definition: xmlstorage.h:180
const WCHAR * LPCWSTR
Definition: xmlstorage.h:185