ReactOS 0.4.15-dev-8145-ga541a46
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
41{
45 fGoButtonShown = false;
46}
47
49{
50}
51
53{
54// m_bFocus = bFocus;
55
56 //Inform the input object site that the focus has changed.
57 if (fSite)
58 {
59#if 0
60 fSite->OnFocusChangeIS((IDockingWindow *)this, bFocus);
61#endif
62 }
63}
64
66{
67 if (!m_hWnd || !pdbi) return E_FAIL; /* Verify window exists */
68 if (pdbi->dwMask & DBIM_MINSIZE)
69 {
71 pdbi->ptMinSize.x = 100;
72 else
73 pdbi->ptMinSize.x = 150;
74 pdbi->ptMinSize.y = 22;
75 }
76 if (pdbi->dwMask & DBIM_MAXSIZE)
77 {
78 pdbi->ptMaxSize.x = 0;
79 pdbi->ptMaxSize.y = 0;
80 }
81 if (pdbi->dwMask & DBIM_INTEGRAL)
82 {
83 pdbi->ptIntegral.x = 0;
84 pdbi->ptIntegral.y = 0;
85 }
86 if (pdbi->dwMask & DBIM_ACTUAL)
87 {
89 pdbi->ptActual.x = 100;
90 else
91 pdbi->ptActual.x = 150;
92 pdbi->ptActual.y = 22;
93 }
94 if (pdbi->dwMask & DBIM_TITLE)
95 {
96 if (!LoadStringW(_AtlBaseModule.GetResourceInstance(), IDS_ADDRESSBANDLABEL, pdbi->wszTitle, _countof(pdbi->wszTitle)))
98 }
99
100 if (pdbi->dwMask & DBIM_MODEFLAGS)
101 pdbi->dwModeFlags = DBIMF_UNDELETEABLE;
102 if (pdbi->dwMask & DBIM_BKCOLOR)
103 pdbi->crBkgnd = 0;
104 return S_OK;
105}
106
108{
109 CComPtr<IShellService> shellService;
110 HWND parentWindow;
111 HWND combobox;
112 HRESULT hResult;
113 IImageList *piml;
114
115 if (pUnkSite == NULL)
116 {
117 fSite.Release();
118 return S_OK;
119 }
120
121 fSite.Release();
122
123 hResult = pUnkSite->QueryInterface(IID_PPV_ARG(IDockingWindowSite, &fSite));
124 if (FAILED_UNEXPECTEDLY(hResult))
125 return hResult;
126
127 // get window handle of parent
128 parentWindow = NULL;
129 hResult = IUnknown_GetWindow(fSite, &parentWindow);
130
131 if (!::IsWindow(parentWindow))
132 return E_FAIL;
133
134 // create combo box ex
137 0, 0, 500, 250, parentWindow, (HMENU)IDM_TOOLBARS_ADDRESSBAR, _AtlBaseModule.GetModuleInstance(), 0);
138 if (combobox == NULL)
139 return E_FAIL;
140 SubclassWindow(combobox);
141
144 {
145 SendMessageW(combobox, CBEM_SETIMAGELIST, 0, 0);
146 }
147 else
148 {
149 SendMessageW(combobox, CBEM_SETIMAGELIST, 0, reinterpret_cast<LPARAM>(piml));
150 }
151
154
155 fEditControl = reinterpret_cast<HWND>(SendMessage(CBEM_GETEDITCONTROL, 0, 0));
156 fComboBox = reinterpret_cast<HWND>(SendMessage(CBEM_GETCOMBOCONTROL, 0, 0));
157 hResult = CAddressEditBox_CreateInstance(IID_PPV_ARG(IAddressEditBox, &fAddressEditBox));
158 if (FAILED_UNEXPECTEDLY(hResult))
159 return hResult;
160
161 hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IShellService, &shellService));
162 if (FAILED_UNEXPECTEDLY(hResult))
163 return hResult;
164 hResult = fAddressEditBox->Init(combobox, fEditControl, 8, fSite /*(IAddressBand *)this*/);
165 if (FAILED_UNEXPECTEDLY(hResult))
166 return hResult;
167 hResult = shellService->SetOwner(fSite);
168 if (FAILED_UNEXPECTEDLY(hResult))
169 return hResult;
170
171 fGoButtonShown = SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton", FALSE, TRUE);
172 if (fGoButtonShown)
174
175 return hResult;
176}
177
179{
180 if (fSite == NULL)
181 return E_FAIL;
182 return fSite->QueryInterface(riid, ppvSite);
183}
184
186{
187 if (lphwnd == NULL)
188 return E_POINTER;
189 *lphwnd = m_hWnd;
190 return S_OK;
191}
192
194{
195 return E_NOTIMPL;
196}
197
199{
200 ShowDW(FALSE);
201
202 if (IsWindow())
204
205 m_hWnd = NULL;
206
207 CComPtr<IShellService> pservice;
208 HRESULT hres = fAddressEditBox->QueryInterface(IID_PPV_ARG(IShellService, &pservice));
209 if (SUCCEEDED(hres ))
210 pservice->SetOwner(NULL);
211
213 if (fSite) fSite.Release();
214
215 if (m_himlNormal)
217
218 if (m_himlHot)
220
221 return S_OK;
222}
223
225 const RECT *prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
226{
227 return E_NOTIMPL;
228}
229
231{
232 if (m_hWnd)
233 {
234 if (fShow)
236 else
238 }
239 return S_OK;
240}
241
243 const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds[ ], OLECMDTEXT *pCmdText)
244{
245 return IUnknown_QueryStatus(fAddressEditBox, *pguidCmdGroup, cCmds, prgCmds, pCmdText);
246}
247
249 DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
250{
251 // incomplete
252 return E_NOTIMPL;
253}
254
256{
258 return S_OK;
259 return S_FALSE;
260}
261
262static WCHAR GetAccessKeyFromText(WCHAR chAccess, LPCWSTR pszText)
263{
264 for (const WCHAR *pch = pszText; *pch != UNICODE_NULL; ++pch)
265 {
266 if (*pch == L'&' && pch[1] == L'&')
267 {
268 /* Skip the first '&', the second is skipped by the for-loop */
269 ++pch;
270 continue;
271 }
272 if (*pch == L'&')
273 {
274 ++pch;
275 chAccess = *pch;
276 break;
277 }
278 }
279
280 ::CharUpperBuffW(&chAccess, 1);
281 return chAccess;
282}
283
285{
286 static WCHAR s_chCache = 0;
287 static LANGID s_ThreadLocale = 0;
288 if (s_chCache && s_ThreadLocale == ::GetThreadLocale())
289 return s_chCache;
290
291 WCHAR szText[80];
292 if (!LoadStringW(_AtlBaseModule.GetResourceInstance(), IDS_ADDRESSBANDLABEL,
293 szText, _countof(szText)))
294 {
295 return chAccess;
296 }
297
298 s_chCache = GetAccessKeyFromText(chAccess, szText);
299 s_ThreadLocale = ::GetThreadLocale();
300 return s_chCache;
301}
302
304{
305 // Enable Address bar access key (Alt+D)
306 switch (lpMsg->message)
307 {
308 case WM_SYSKEYDOWN:
309 case WM_SYSCHAR:
310 {
311 WCHAR chAccess = GetAddressBarAccessKey(L'D');
312 if (lpMsg->wParam == chAccess)
313 {
316 return S_FALSE;
317 }
318 break;
319 }
320 }
321
322 if (lpMsg->hwnd == fEditControl)
323 {
324 switch (lpMsg->message)
325 {
326 case WM_SYSKEYDOWN:
327 case WM_SYSKEYUP:
328 case WM_SYSCOMMAND:
329 case WM_SYSDEADCHAR:
330 case WM_SYSCHAR:
331 return S_FALSE;
332 }
333
334 TranslateMessage(lpMsg);
335 DispatchMessage(lpMsg);
336 return S_OK;
337 }
338 return S_FALSE;
339}
340
342{
343 if (fActivate)
344 {
345 IUnknown_OnFocusChangeIS(fSite, static_cast<IDeskBand *>(this), fActivate);
346 SetFocus();
347 }
348 return S_OK;
349}
350
352 HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
353{
354 CComPtr<IWinEventHandler> winEventHandler;
355 HRESULT hResult;
356 RECT rect;
357
358 if (theResult)
359 *theResult = 0;
360
361 switch (uMsg)
362 {
363 case WM_WININICHANGE:
364 break;
365 case WM_COMMAND:
367 {
368 fGoButtonShown = !SHRegGetBoolUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton", FALSE, TRUE);
369 SHRegSetUSValueW(L"Software\\Microsoft\\Internet Explorer\\Main", L"ShowGoButton", REG_SZ, fGoButtonShown ? (LPVOID)L"yes" : (LPVOID)L"no", fGoButtonShown ? 8 : 6, SHREGSET_FORCE_HKCU);
370 if (!fGoButton)
374 SendMessage(m_hWnd,WM_SIZE,0,MAKELPARAM(rect.right-rect.left,rect.bottom-rect.top));
375 // broadcast change notification to all explorer windows
376 }
377 break;
378 }
379 hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IWinEventHandler, &winEventHandler));
380 if (FAILED_UNEXPECTEDLY(hResult))
381 return hResult;
382 return winEventHandler->OnWinEvent(hWnd, uMsg, wParam, lParam, theResult);
383}
384
386{
387 CComPtr<IWinEventHandler> winEventHandler;
388 HRESULT hResult;
389
390 if (fAddressEditBox)
391 {
392 hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IWinEventHandler, &winEventHandler));
393 if (FAILED_UNEXPECTEDLY(hResult))
394 return hResult;
395 return winEventHandler->IsWindowOwner(hWnd);
396 }
397 return S_FALSE;
398}
399
401{
402 CComPtr<IAddressBand> addressBand;
403 HRESULT hResult;
404
405 hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IAddressBand, &addressBand));
406 if (FAILED_UNEXPECTEDLY(hResult))
407 return hResult;
408 return addressBand->FileSysChange(param8, paramC);
409}
410
412{
413 CComPtr<IAddressBand> addressBand;
414 HRESULT hResult;
415
416 hResult = fAddressEditBox->QueryInterface(IID_PPV_ARG(IAddressBand, &addressBand));
417 if (FAILED_UNEXPECTEDLY(hResult))
418 return hResult;
419 return addressBand->Refresh(param8);
420}
421
423{
424 return E_NOTIMPL;
425}
426
428{
429 return E_NOTIMPL;
430}
431
433{
434 if (pClassID == NULL)
435 return E_POINTER;
436 *pClassID = CLSID_SH_AddressBand;
437 return S_OK;
438}
439
441{
442 return E_NOTIMPL;
443}
444
446{
447 // incomplete
448 return E_NOTIMPL;
449}
450
452{
453 // incomplete
454 return E_NOTIMPL;
455}
456
458{
459 // incomplete
460 return E_NOTIMPL;
461}
462
464{
465 if (notifyHeader->hwndFrom == fGoButton)
466 {
467 fAddressEditBox->Execute(0);
468 }
469 return 0;
470}
471
472LRESULT CAddressBand::OnTipText(UINT idControl, NMHDR *notifyHeader, BOOL &bHandled)
473{
474 if (notifyHeader->hwndFrom == fGoButton)
475 {
476 WCHAR szText[MAX_PATH];
477 WCHAR szFormat[MAX_PATH];
478 LPNMTBGETINFOTIP pGIT = (LPNMTBGETINFOTIP)notifyHeader;
479
480 if (::GetWindowTextW(fEditControl, szText, _countof(szText)))
481 {
482 LoadStringW(_AtlBaseModule.GetResourceInstance(), IDS_GOBUTTONTIPTEMPLATE, szFormat, _countof(szFormat));
483 wnsprintf(pGIT->pszText, pGIT->cchTextMax, szFormat, szText);
484 }
485 else
486 *pGIT->pszText = 0;
487 }
488 return 0;
489}
490
492{
493 POINT pt;
494 POINT ptOrig;
495 HWND parentWindow;
497
498 if (fGoButtonShown == false)
499 {
500 bHandled = FALSE;
501 return 0;
502 }
503 pt.x = 0;
504 pt.y = 0;
505 parentWindow = GetParent();
506 ::MapWindowPoints(m_hWnd, parentWindow, &pt, 1);
507 OffsetWindowOrgEx(reinterpret_cast<HDC>(wParam), pt.x, pt.y, &ptOrig);
508 result = SendMessage(parentWindow, WM_ERASEBKGND, wParam, 0);
509 SetWindowOrgEx(reinterpret_cast<HDC>(wParam), ptOrig.x, ptOrig.y, NULL);
510 if (result == 0)
511 {
512 bHandled = FALSE;
513 return 0;
514 }
515 return result;
516}
517
519{
520 RECT goButtonBounds;
521 RECT buttonBounds;
522 long buttonWidth;
523 long buttonHeight;
524 RECT comboBoxBounds;
525 long newHeight;
526 long newWidth;
527
528 if (fGoButtonShown == false)
529 {
530 bHandled = FALSE;
531 return 0;
532 }
533
534 newHeight = HIWORD(lParam);
535 newWidth = LOWORD(lParam);
536
537 if (!fGoButton)
539
540 SendMessage(fGoButton, TB_GETITEMRECT, 0, reinterpret_cast<LPARAM>(&buttonBounds));
541 buttonWidth = buttonBounds.right - buttonBounds.left;
542 buttonHeight = buttonBounds.bottom - buttonBounds.top;
543
544 DefWindowProc(WM_SIZE, wParam, MAKELONG(newWidth - buttonWidth - 2, newHeight));
545 ::GetWindowRect(fComboBox, &comboBoxBounds);
546 ::SetWindowPos(fGoButton, NULL, newWidth - buttonWidth, (comboBoxBounds.bottom - comboBoxBounds.top - buttonHeight) / 2,
547 buttonWidth, buttonHeight, SWP_NOOWNERZORDER | SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER);
548
549 goButtonBounds.left = newWidth - buttonWidth;
550 goButtonBounds.top = 0;
551 goButtonBounds.right = newWidth - buttonWidth;
552 goButtonBounds.bottom = newHeight;
553 InvalidateRect(&goButtonBounds, TRUE);
554
556 return 0;
557}
558
560{
561 RECT goButtonBounds;
562 RECT buttonBounds;
563 long buttonWidth;
564 long buttonHeight;
565 RECT comboBoxBounds;
566 WINDOWPOS positionInfoCopy;
567 long newHeight;
568 long newWidth;
569
570 if (!fGoButtonShown)
571 {
572 bHandled = FALSE;
573 return 0;
574 }
575
576 if (!fGoButton)
578
579 positionInfoCopy = *reinterpret_cast<WINDOWPOS *>(lParam);
580 newHeight = positionInfoCopy.cy;
581 newWidth = positionInfoCopy.cx;
582
583 SendMessage(fGoButton, TB_GETITEMRECT, 0, reinterpret_cast<LPARAM>(&buttonBounds));
584
585 buttonWidth = buttonBounds.right - buttonBounds.left;
586 buttonHeight = buttonBounds.bottom - buttonBounds.top;
587 positionInfoCopy.cx = newWidth - 2 - buttonWidth;
588 DefWindowProc(WM_WINDOWPOSCHANGING, wParam, reinterpret_cast<LPARAM>(&positionInfoCopy));
589 ::GetWindowRect(fComboBox, &comboBoxBounds);
590 ::SetWindowPos(fGoButton, NULL, newWidth - buttonWidth, (comboBoxBounds.bottom - comboBoxBounds.top - buttonHeight) / 2,
591 buttonWidth, buttonHeight, SWP_NOOWNERZORDER | SWP_SHOWWINDOW | SWP_NOACTIVATE | SWP_NOZORDER);
592
593 goButtonBounds.left = newWidth - buttonWidth;
594 goButtonBounds.top = 0;
595 goButtonBounds.right = newWidth - buttonWidth;
596 goButtonBounds.bottom = newHeight;
597 InvalidateRect(&goButtonBounds, TRUE);
598
600 return 0;
601}
602
604{
605 const TBBUTTON buttonInfo [] = { { 0, 1, TBSTATE_ENABLED, 0 } };
606 HINSTANCE shellInstance;
607
608 shellInstance = _AtlBaseModule.GetResourceInstance();
610 20, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
612 20, 0, RGB(255, 0, 255), IMAGE_BITMAP, LR_CREATEDIBSECTION);
613
617 0, 0, 0, 0, m_hWnd, NULL, _AtlBaseModule.GetModuleInstance(), NULL);
620 if (m_himlNormal)
622 if (m_himlHot)
625 reinterpret_cast<WPARAM>(_AtlBaseModule.GetResourceInstance()), IDS_GOBUTTONLABEL);
626 SendMessage(fGoButton, TB_ADDBUTTONSW, 1, (LPARAM) &buttonInfo);
627}
static WCHAR GetAddressBarAccessKey(WCHAR chAccess)
static WCHAR GetAccessKeyFromText(WCHAR chAccess, LPCWSTR pszText)
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:65
CComPtr< IAddressEditBox > fAddressEditBox
Definition: addressband.h:39
STDMETHOD() ShowDW(BOOL fShow) override
STDMETHOD() IsWindowOwner(HWND hWnd) override
STDMETHOD() FileSysChange(long param8, long paramC) override
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:52
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:48
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
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:123
#define IDM_TOOLBARS_GOBUTTON
Definition: resource.h:36
#define IDS_GOBUTTONLABEL
Definition: resource.h:122
#define IDS_ADDRESSBANDLABEL
Definition: resource.h:126
#define IDM_TOOLBARS_ADDRESSBAR
Definition: resource.h:31
BOOL WINAPI ImageList_Destroy(HIMAGELIST himl)
Definition: imagelist.c:928
HIMAGELIST WINAPI ImageList_LoadImageW(HINSTANCE hi, LPCWSTR lpbmp, INT cx, INT cGrow, COLORREF clrMask, UINT uType, UINT uFlags)
Definition: imagelist.c:2208
#define MAX_PATH
Definition: compat.h:34
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
LCID WINAPI GetThreadLocale(void)
Definition: locale.c:2800
HRESULT WINAPI IUnknown_QueryStatus(IUnknown *lpUnknown, REFGUID pguidCmdGroup, ULONG cCmds, OLECMD *prgCmds, OLECMDTEXT *pCmdText)
Definition: ordinal.c:1044
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1332
HRESULT WINAPI IUnknown_OnFocusChangeIS(LPUNKNOWN lpUnknown, LPUNKNOWN pFocusObject, BOOL bFocus)
Definition: ordinal.c:4767
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:92
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:3832
#define TB_BUTTONSTRUCTSIZE
Definition: commctrl.h:1134
#define WC_COMBOBOXEXW
Definition: commctrl.h:3781
#define TB_ADDSTRINGW
Definition: commctrl.h:1132
#define TB_SETIMAGELIST
Definition: commctrl.h:1150
#define CCS_NODIVIDER
Definition: commctrl.h:2248
#define TOOLBARCLASSNAMEW
Definition: commctrl.h:943
#define CBEM_SETEXTENDEDSTYLE
Definition: commctrl.h:3835
#define TB_GETITEMRECT
Definition: commctrl.h:1133
#define CBEM_SETIMAGELIST
Definition: commctrl.h:3827
#define TBSTATE_ENABLED
Definition: commctrl.h:974
#define CBES_EX_NOSIZELIMIT
Definition: commctrl.h:3854
#define TBSTYLE_FLAT
Definition: commctrl.h:992
#define CBES_EX_CASESENSITIVE
Definition: commctrl.h:3855
#define CCS_NOPARENTALIGN
Definition: commctrl.h:2246
#define CCS_NORESIZE
Definition: commctrl.h:2245
#define TB_SETHOTIMAGELIST
Definition: commctrl.h:1154
#define TB_ADDBUTTONSW
Definition: commctrl.h:1266
#define CCS_NOMOVEY
Definition: commctrl.h:2243
#define TB_SETMAXTEXTROWS
Definition: commctrl.h:1162
#define LPNMTBGETINFOTIP
Definition: commctrl.h:1394
#define CBEM_GETEDITCONTROL
Definition: commctrl.h:3833
#define REFIID
Definition: guiddef.h:118
#define DefWindowProc
Definition: ros2win.h:31
#define SHIL_SMALL
Definition: shellapi.h:185
HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv)
Definition: shellord.c:2452
HRESULT hr
Definition: shlfolder.c:183
#define SHREGSET_FORCE_HKCU
Definition: shlwapi.h:312
#define wnsprintf
Definition: shlwapi.h:1701
#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:2428
WCHAR wszTitle[256]
Definition: shobjidl.idl:2426
UINT message
Definition: winuser.h:3115
HWND hwnd
Definition: winuser.h:3114
WPARAM wParam
Definition: winuser.h:3116
HWND hwndFrom
Definition: winuser.h:3157
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:800
#define IDB_GOBUTTON_HOT
Definition: undocshell.h:801
int WINAPI GetWindowTextW(HWND hWnd, LPWSTR lpString, int nMaxCount)
Definition: window.c:1412
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:1893
#define CBS_OWNERDRAWFIXED
Definition: winuser.h:289
#define WM_ERASEBKGND
Definition: winuser.h:1625
#define CreateWindowEx
Definition: winuser.h:5755
BOOL WINAPI IsWindow(_In_opt_ HWND)
#define SW_HIDE
Definition: winuser.h:768
#define CB_SETDROPPEDWIDTH
Definition: winuser.h:1962
#define SWP_NOACTIVATE
Definition: winuser.h:1242
#define WM_SYSCOMMAND
Definition: winuser.h:1741
#define IMAGE_BITMAP
Definition: winuser.h:211
BOOL WINAPI TranslateMessage(_In_ const MSG *)
#define MAKELPARAM(l, h)
Definition: winuser.h:4008
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:1661
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:1611
#define LR_CREATEDIBSECTION
Definition: winuser.h:1098
#define WM_COMMAND
Definition: winuser.h:1740
#define WM_WININICHANGE
Definition: winuser.h:1630
#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:1721
#define WM_SYSDEADCHAR
Definition: winuser.h:1722
HWND WINAPI SetFocus(_In_opt_ HWND)
#define SWP_SHOWWINDOW
Definition: winuser.h:1248
#define SendMessage
Definition: winuser.h:5843
#define WM_SYSKEYUP
Definition: winuser.h:1720
#define EM_SETSEL
Definition: winuser.h:2018
DWORD WINAPI CharUpperBuffW(_Inout_updates_(cchLength) LPWSTR lpsz, _In_ DWORD cchLength)
#define CB_GETDROPPEDSTATE
Definition: winuser.h:1945
HWND WINAPI GetParent(_In_ HWND)
#define SWP_NOOWNERZORDER
Definition: winuser.h:1249
#define SW_SHOW
Definition: winuser.h:775
#define DispatchMessage
Definition: winuser.h:5765
BOOL WINAPI InvalidateRect(_In_opt_ HWND, _In_opt_ LPCRECT, _In_ BOOL)
#define MAKEINTRESOURCEW(i)
Definition: winuser.h:582
#define SWP_NOZORDER
Definition: winuser.h:1247
BOOL WINAPI DestroyWindow(_In_ HWND)
#define WM_SYSKEYDOWN
Definition: winuser.h:1719
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