ReactOS 0.4.15-dev-7711-g5627da4
CISFBand.cpp
Go to the documentation of this file.
1/*
2 * PROJECT: ReactOS shell extensions
3 * LICENSE: GPL - See COPYING in the top level directory
4 * FILE: dll/shellext/qcklnch/CISFBand.cpp
5 * PURPOSE: Quick Launch Toolbar (Taskbar Shell Extension)
6 * PROGRAMMERS: Shriraj Sawant a.k.a SR13 <sr.official@hotmail.com>
7 */
8
9#include "shellbars.h"
10
11#include <commoncontrols.h>
12#include <shellapi.h>
13#include <wingdi.h>
14#include <uxtheme.h>
15
16/*
17TODO:
18 ** drag and drop support
19 ** tooltips
20 ** handle change notifications
21 ** Fix position of the items context menu
22 ** Implement responding to theme change
23*/
24
25//*****************************************************************************************
26// *** CISFBand ***
27
29 m_BandID(0),
30 m_pidl(NULL),
31 m_textFlag(true),
32 m_iconFlag(true),
33 m_QLaunch(false)
34{
35}
36
38{
39 CloseDW(0);
40}
41
42// Toolbar
43/*++
44* @name CreateSimpleToolbar
45*
46* Creates a toolbar and fills it up with buttons for enumerated objects.
47*
48* @param hWndParent
49* Handle to the parent window, which receives the appropriate messages from child toolbar.
50*
51* @return The error code.
52*
53*--*/
55{
56 // Declare and initialize local constants.
57 const DWORD buttonStyles = BTNS_AUTOSIZE;
58
59 // Create the toolbar.
62 hWndParent, NULL, 0, NULL);
63 if (m_hWnd == NULL)
64 return E_FAIL;
65
66 if (!m_textFlag)
68
69 // Set the image list.
70 HIMAGELIST* piml;
71 HRESULT hr = SHGetImageList(SHIL_SMALL, IID_IImageList, (void**)&piml);
73 {
75 return hr;
76 }
77 SendMessage(m_hWnd, TB_SETIMAGELIST, 0, (LPARAM)piml);
78
79 // Enumerate objects
80 CComPtr<IEnumIDList> pEndl;
81 LPITEMIDLIST pidl;
82 STRRET stret;
83 hr = m_pISF->EnumObjects(0, SHCONTF_FOLDERS|SHCONTF_NONFOLDERS, &pEndl);
85 {
87 return hr;
88 }
89
90 for (int i=0; pEndl->Next(1, &pidl, NULL) != S_FALSE; i++)
91 {
92 WCHAR sz[MAX_PATH];
94 hr = m_pISF->GetDisplayNameOf(pidl, SHGDN_NORMAL, &stret);
96 {
97 StringCchCopyW(sz, MAX_PATH, L"<Unknown-Name>");
98 }
99 else
100 StrRetToBuf(&stret, pidl, sz, _countof(sz));
101
102 TBBUTTON tb = { MAKELONG(index, 0), i, TBSTATE_ENABLED, buttonStyles,{ 0 }, (DWORD_PTR)pidl, (INT_PTR)sz };
104 }
105
106 // Resize the toolbar, and then show it.
107 SendMessage(m_hWnd, TB_AUTOSIZE, 0, 0);
108
109 return hr;
110}
111
112/*****************************************************************************/
113
114// *** IObjectWithSite ***
116 {
117 HRESULT hr;
119
120 TRACE("CISFBand::SetSite(0x%p)\n", pUnkSite);
121
122 hr = IUnknown_GetWindow(pUnkSite, &hwndParent);
123 if (FAILED(hr))
124 {
125 TRACE("Querying site window failed: 0x%x\n", hr);
126 return hr;
127 }
128 m_Site = pUnkSite;
129
132 return hr;
133
134 return S_OK;
135 }
136
138 {
139 TRACE("CISFBand::GetSite(0x%p,0x%p)\n", riid, ppvSite);
140
141 HRESULT hr;
142 if (m_Site != NULL)
143 {
144 hr = m_Site->QueryInterface(riid, ppvSite);
145 if (FAILED(hr)) return hr;
146 }
147
148 *ppvSite = NULL;
149 return E_FAIL;
150 }
151
152/*****************************************************************************/
153// *** IDeskBand ***
155 {
156 if (!m_hWnd)
157 return E_FAIL;
158 if (!phwnd)
159 return E_POINTER;
160 *phwnd = m_hWnd;
161
162 return S_OK;
163 }
164
166 {
167 /* FIXME: Implement */
168 return E_NOTIMPL;
169 }
170
172 {
173 if (m_hWnd)
174 {
175 ShowWindow(bShow ? SW_SHOW : SW_HIDE);
176 return S_OK;
177 }
178
179 return E_FAIL;
180 }
181
183 {
184 if (m_hWnd)
185 {
187
188 TBBUTTON tb;
189 for (int i = 0; SendMessage(m_hWnd, TB_GETBUTTON, i, (LPARAM)&tb); i++)
190 {
192 }
193
195 m_hWnd = NULL;
196 return S_OK;
197 }
198
199 return E_FAIL;
200 }
201
202 STDMETHODIMP CISFBand::ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
203 {
204 /* No need to implement this method */
205
206 return E_NOTIMPL;
207 }
208
210 {
211 TRACE("CTaskBand::GetBandInfo(0x%x,0x%x,0x%p) hWnd=0x%p\n", dwBandID, dwViewMode, pdbi, m_hWnd);
212
213 if (m_hWnd && pdbi)
214 {
215 m_BandID = dwBandID;
216
217 RECT actualRect;
218 POINTL actualSize;
219 POINTL idealSize;
220 POINTL maxSize;
221 POINTL itemSize;
222
223 GetWindowRect(&actualRect);
224 actualSize.x = actualRect.right - actualRect.left;
225 actualSize.y = actualRect.bottom - actualRect.top;
226
227 // Obtain the ideal size, to be used as min and max
228 SendMessageW(m_hWnd, TB_AUTOSIZE, 0, 0);
229 SendMessageW(m_hWnd, TB_GETMAXSIZE, 0, reinterpret_cast<LPARAM>(&maxSize));
230
231 idealSize = maxSize;
232 SendMessageW(m_hWnd, TB_GETIDEALSIZE, FALSE, reinterpret_cast<LPARAM>(&idealSize));
233
234 // Obtain the button size, to be used as the integral size
235 DWORD size = SendMessageW(m_hWnd, TB_GETBUTTONSIZE, 0, 0);
236 itemSize.x = GET_X_LPARAM(size);
237 itemSize.y = GET_Y_LPARAM(size);
238
239 if (pdbi->dwMask & DBIM_MINSIZE)
240 {
241 if (m_QLaunch)
242 pdbi->ptMinSize.x = idealSize.x;
243 else
244 pdbi->ptMinSize.x = -1;
245 pdbi->ptMinSize.y = idealSize.y;
246 }
247 if (pdbi->dwMask & DBIM_MAXSIZE)
248 {
249 pdbi->ptMaxSize = maxSize;
250 }
251 if (pdbi->dwMask & DBIM_INTEGRAL)
252 {
253 pdbi->ptIntegral = itemSize;
254 }
255 if (pdbi->dwMask & DBIM_ACTUAL)
256 {
257 pdbi->ptActual = actualSize;
258 }
259 if (pdbi->dwMask & DBIM_TITLE)
260 {
261 if (m_QLaunch || !ILGetDisplayNameEx(NULL, m_pidl, pdbi->wszTitle, ILGDN_INFOLDER))
262 {
263 pdbi->dwMask &= ~DBIM_TITLE;
264 }
265 }
266 if (pdbi->dwMask & DBIM_MODEFLAGS)
267 {
268 pdbi->dwModeFlags = DBIMF_NORMAL | DBIMF_VARIABLEHEIGHT | DBIMF_USECHEVRON | DBIMF_NOMARGINS | DBIMF_BKCOLOR;
269 if (m_QLaunch)
270 {
271 pdbi->dwModeFlags |= DBIMF_ADDTOFRONT;
272 }
273 }
274 if (pdbi->dwMask & DBIM_BKCOLOR)
275 pdbi->dwMask &= ~DBIM_BKCOLOR;
276
277 return S_OK;
278 }
279
280 return E_FAIL;
281 }
282
283/*****************************************************************************/
284// *** IPersistStream ***
286 {
287 *pClassID = CLSID_ISFBand;
288
289 return S_OK;
290 }
291
293 {
294 /* The object hasn't changed since the last save! */
295
296 return S_FALSE;
297 }
298
300 {
301 TRACE("CISFBand::Load called\n");
302 /* Nothing to do */
303
304 return S_OK;
305 }
306
308 {
309 /* Nothing to do */
310
311 return S_OK;
312 }
313
315 {
316 TRACE("CISFBand::GetSizeMax called\n");
317
318 return S_OK;
319 }
320
321/*****************************************************************************/
322// *** IWinEventHandler ***
324 {
325 if (hWnd == m_hWnd || IsChild(hWnd))
326 {
327 TRACE("CISFBand::ContainsWindow(0x%p) returns S_OK\n", hWnd);
328 return S_OK;
329 }
330
331 return S_FALSE;
332 }
333
335 {
336 switch (uMsg)
337 {
338 case WM_COMMAND:
339 {
340 TBBUTTON tb;
341 bool chk = SendMessage(m_hWnd, TB_GETBUTTON, LOWORD(wParam), (LPARAM)&tb);
342 if (chk)
344
345 if (theResult)
346 *theResult = TRUE;
347 break;
348 }
349 case WM_NOTIFY:
350 {
351 switch (((LPNMHDR)lParam)->code)
352 {
353 case NM_RCLICK:
354 {
355 HRESULT hr;
356 POINT pt = ((LPNMMOUSE)lParam)->pt; // Already in screen coordinates
357 CComPtr<IContextMenu> picm;
358 HMENU fmenu = CreatePopupMenu();
359 TBBUTTON tb;
360
361 bool chk = SendMessage(m_hWnd, TB_GETBUTTON, ((LPNMMOUSE)lParam)->dwItemSpec, (LPARAM)&tb);
362 LPITEMIDLIST pidl = (LPITEMIDLIST)tb.dwData;
363
364 if (chk)
365 {
366 hr = m_pISF->GetUIObjectOf(m_hWnd, 1, &pidl, IID_NULL_PPV_ARG(IContextMenu, &picm));
368 return hr;
369
370 hr = picm->QueryContextMenu(fmenu, 0, 1, 0x7FFF, CMF_DEFAULTONLY);
372 return hr;
373
374 int id = TrackPopupMenuEx(fmenu, TPM_LEFTALIGN | TPM_BOTTOMALIGN | TPM_RETURNCMD, pt.x, pt.y, m_hWnd, 0);
375 if (id > 0)
376 {
378 info.cbSize = sizeof(info);
379 info.fMask = CMIC_MASK_PTINVOKE;
380 if (GetKeyState(VK_CONTROL) < 0)
381 {
382 info.fMask |= CMIC_MASK_CONTROL_DOWN;
383 }
384 if (GetKeyState(VK_SHIFT) < 0)
385 {
386 info.fMask |= CMIC_MASK_SHIFT_DOWN;
387 }
388 info.hwnd = m_hWnd;
389 info.lpVerb = MAKEINTRESOURCEA(id - 1);
390 info.nShow = SW_SHOWNORMAL;
391 info.ptInvoke = pt;
392 picm->InvokeCommand((LPCMINVOKECOMMANDINFO)&info);
393 }
394 }
395 DestroyMenu(fmenu);
396
397 if (theResult)
398 *theResult = TRUE;
399 break;
400 }
401 default:
402 if (theResult)
403 *theResult = FALSE;
404 }
405
406 break;
407 }
408 default:
409 if (theResult)
410 *theResult = FALSE;
411 }
412
413 return S_OK;
414 }
415
417 {
418 return (hWnd == m_hWnd) ? S_OK : S_FALSE;
419 }
420
421/*****************************************************************************/
422// *** IOleCommandTarget methods ***
423 STDMETHODIMP CISFBand::QueryStatus(const GUID *pguidCmdGroup, ULONG cCmds, OLECMD prgCmds [], OLECMDTEXT *pCmdText)
424 {
426
427 return E_NOTIMPL;
428 }
429
430 STDMETHODIMP CISFBand::Exec(const GUID *pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
431 {
432 if (IsEqualIID(*pguidCmdGroup, IID_IBandSite))
433 {
434 return S_OK;
435 }
436
437 if (IsEqualIID(*pguidCmdGroup, IID_IDeskBand))
438 {
439 if (nCmdID == DBID_SETWINDOWTHEME)
440 {
441 if (pvaIn && V_VT(pvaIn) == VT_BSTR && V_BSTR(pvaIn))
442 {
443 SetWindowTheme(m_hWnd, V_BSTR(pvaIn), NULL);
444 }
445 }
446 return S_OK;
447 }
448
450
451 return E_NOTIMPL;
452 }
453
454/*****************************************************************************/
455// *** IShellFolderBand ***
457 {
458 if (pbi->dwMask == ISFB_MASK_IDLIST)
459 {
460 pbi->pidl = ILClone(m_pidl);
461 if (!pbi->pidl)
462 return E_OUTOFMEMORY;
463 return S_OK;
464 }
465
466 return E_NOTIMPL;
467 }
468
470 {
471 HRESULT hr;
472
473 if (!psf && !pidl)
474 return E_INVALIDARG;
475
476 if (psf && pidl)
477 return E_INVALIDARG;
478
479 if (pidl != NULL)
480 {
481 CComPtr<IShellFolder> psfDesktop;
482 hr = SHGetDesktopFolder(&psfDesktop);
484 return hr;
485
486 if (_ILIsDesktop(pidl))
487 {
488 m_pISF = psfDesktop;
489 }
490 else
491 {
492 hr = psfDesktop->BindToObject(pidl, NULL, IID_PPV_ARG(IShellFolder, &m_pISF));
494 return hr;
495 }
496
497 m_pidl = ILClone(pidl);
498 }
499
500 if (psf != NULL)
501 {
502 CComPtr<IPersistFolder2> ppf2;
505 return hr;
506
507 hr = ppf2->GetCurFolder(&m_pidl);
509 return hr;
510
511 m_pISF = psf;
512 }
513
514 return S_OK;
515 }
516
518 {
519 if ((pbi->dwMask & ISFB_MASK_STATE) &&
520 (pbi->dwState & ISFB_STATE_QLINKSMODE) &&
521 (pbi->dwStateMask & ISFB_STATE_QLINKSMODE))
522 {
523 m_QLaunch = true;
524 m_textFlag = false;
525 if (m_hWnd)
527 }
528
529 return E_NOTIMPL;
530 }
531
532/*****************************************************************************/
533// *** IContextMenu ***
535 {
536 /*HRESULT hr = E_INVALIDARG;
537
538 if (idCmd == IDM_DISPLAY)
539 {
540 switch (uFlags)
541 {
542 case GCS_HELPTEXTW:
543 // Only useful for pre-Vista versions of Windows that
544 // have a Status bar.
545 hr = StringCchCopyW(reinterpret_cast<PWSTR>(pszName),
546 cchMax,
547 L"Display File Name");
548 break;
549
550 case GCS_VERBW:
551 // GCS_VERBW is an optional feature that enables a caller
552 // to discover the canonical name for the verb that is passed in
553 // through idCommand.
554 hr = StringCchCopyW(reinterpret_cast<PWSTR>(pszName),
555 cchMax,
556 L"DisplayFileName");
557 break;
558 }
559 }
560 return hr; */
561
562 return S_OK;
563 }
564
566 {
567 if (!HIWORD(pici->lpVerb))
568 {
569 switch (LOWORD(pici->lpVerb))
570 {
571 case IDM_LARGE_ICONS:
572 {
573 m_iconFlag = false;
574
575 HIMAGELIST* piml = (HIMAGELIST*) SendMessage(m_hWnd, TB_GETIMAGELIST, 0, 0);
576 HRESULT hr = SHGetImageList(SHIL_LARGE, IID_IImageList, (void**)&piml);
577 if (FAILED_UNEXPECTEDLY(hr)) return hr;
578 SendMessage(m_hWnd, TB_SETIMAGELIST, 0, (LPARAM)piml);
579 hr = IUnknown_Exec(m_Site, IID_IDeskBand, DBID_BANDINFOCHANGED, 0, NULL, NULL);
580 if (FAILED_UNEXPECTEDLY(hr)) return hr;
581 break;
582 }
583 case IDM_SMALL_ICONS:
584 {
585 m_iconFlag = true;
586
587 HIMAGELIST* piml = (HIMAGELIST*)SendMessage(m_hWnd, TB_GETIMAGELIST, 0, 0);
588 HRESULT hr = SHGetImageList(SHIL_SMALL, IID_IImageList, (void**)&piml);
589 if (FAILED_UNEXPECTEDLY(hr)) return hr;
590 SendMessage(m_hWnd, TB_SETIMAGELIST, 0, (LPARAM)piml);
591 hr = IUnknown_Exec(m_Site, IID_IDeskBand, DBID_BANDINFOCHANGED, 0, NULL, NULL);
592 if (FAILED_UNEXPECTEDLY(hr)) return hr;
593 break;
594 }
595 case IDM_OPEN_FOLDER:
596 {
597 SHELLEXECUTEINFO shexinfo;
598
599 memset(&shexinfo, 0x0, sizeof(shexinfo));
600
601 shexinfo.cbSize = sizeof(shexinfo);
602 shexinfo.fMask = SEE_MASK_IDLIST;
603 shexinfo.lpVerb = _T("open");
604 shexinfo.lpIDList = m_pidl;
605 shexinfo.nShow = SW_SHOW;
606
607 if (!ShellExecuteEx(&shexinfo))
608 return E_FAIL;
609
610 break;
611 }
612 case IDM_SHOW_TEXT:
613 {
614 if (m_textFlag)
615 {
616 m_textFlag = false;
619 if (FAILED_UNEXPECTEDLY(hr)) return hr;
620 }
621 else
622 {
623 m_textFlag = true;
624 SendMessage(m_hWnd, TB_SETEXTENDEDSTYLE, 0, 0);
626 if (FAILED_UNEXPECTEDLY(hr)) return hr;
627 }
628 break;
629 }
630 default:
631 return E_FAIL;
632 }
633 }
634
635 return S_OK;
636 }
637
639 {
641
642 if(m_textFlag)
644 else
646
647 if (m_iconFlag)
648 {
651 }
652 else
653 {
656 }
657
658 if (_ILIsDesktop(m_pidl))
660
661 UINT idMax = Shell_MergeMenus(hmenu, GetSubMenu(qMenu, 0), indexMenu, idCmdFirst, idCmdLast, MM_SUBMENUSHAVEIDS);
662 DestroyMenu(qMenu);
663 return MAKE_HRESULT(SEVERITY_SUCCESS, 0, USHORT(idMax - idCmdFirst +1));
664 }
665
666/*****************************************************************************/
667// C Constructor
668 extern "C"
670 {
671 return ShellObjectCreator<CISFBand>(riid, ppv);
672 }
673
BOOL _ILIsDesktop(LPCITEMIDLIST pidl)
Definition: CBandSite.h:24
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
HRESULT WINAPI RSHELL_CISFBand_CreateInstance(REFIID riid, void **ppv)
Definition: CISFBand.cpp:669
UINT cchMax
HWND hWnd
Definition: settings.c:17
#define STDMETHODIMP
Definition: basetyps.h:43
#define UNIMPLEMENTED
Definition: debug.h:115
virtual STDMETHODIMP GetSite(IN REFIID riid, OUT void **ppvSite)
Definition: CISFBand.cpp:137
virtual STDMETHODIMP GetWindow(OUT HWND *phwnd)
Definition: CISFBand.cpp:154
HRESULT CreateSimpleToolbar(HWND hWndParent)
Definition: CISFBand.cpp:54
virtual STDMETHODIMP GetCommandString(UINT_PTR idCmd, UINT uFlags, UINT *pwReserved, LPSTR pszName, UINT cchMax)
Definition: CISFBand.cpp:534
CComPtr< IUnknown > m_Site
Definition: CISFBand.h:25
virtual STDMETHODIMP CloseDW(IN DWORD dwReserved)
Definition: CISFBand.cpp:182
virtual STDMETHODIMP ResizeBorderDW(LPCRECT prcBorder, IUnknown *punkToolbarSite, BOOL fReserved)
Definition: CISFBand.cpp:202
virtual STDMETHODIMP ShowDW(IN BOOL bShow)
Definition: CISFBand.cpp:171
CISFBand()
Definition: CISFBand.cpp:28
DWORD m_BandID
Definition: CISFBand.h:24
virtual STDMETHODIMP QueryContextMenu(HMENU hmenu, UINT indexMenu, UINT idCmdFirst, UINT idCmdLast, UINT uFlags)
Definition: CISFBand.cpp:638
BOOL m_QLaunch
Definition: CISFBand.h:34
virtual STDMETHODIMP InvokeCommand(LPCMINVOKECOMMANDINFO pici)
Definition: CISFBand.cpp:565
PIDLIST_ABSOLUTE m_pidl
Definition: CISFBand.h:29
virtual STDMETHODIMP IsWindowOwner(HWND hWnd)
Definition: CISFBand.cpp:416
BOOL m_textFlag
Definition: CISFBand.h:32
virtual STDMETHODIMP GetClassID(OUT CLSID *pClassID)
Definition: CISFBand.cpp:285
virtual STDMETHODIMP QueryStatus(IN const GUID *pguidCmdGroup, IN ULONG cCmds, IN OUT OLECMD prgCmds[], IN OUT OLECMDTEXT *pCmdText)
Definition: CISFBand.cpp:423
virtual STDMETHODIMP Save(IN IStream *pStm, IN BOOL fClearDirty)
Definition: CISFBand.cpp:307
virtual STDMETHODIMP ContainsWindow(IN HWND hWnd)
Definition: CISFBand.cpp:323
virtual STDMETHODIMP IsDirty()
Definition: CISFBand.cpp:292
virtual STDMETHODIMP Load(IN IStream *pStm)
Definition: CISFBand.cpp:299
virtual STDMETHODIMP SetBandInfoSFB(PBANDINFOSFB pbi)
Definition: CISFBand.cpp:517
virtual STDMETHODIMP SetSite(IN IUnknown *pUnkSite)
Definition: CISFBand.cpp:115
virtual ~CISFBand()
Definition: CISFBand.cpp:37
virtual STDMETHODIMP InitializeSFB(IShellFolder *psf, PCIDLIST_ABSOLUTE pidl)
Definition: CISFBand.cpp:469
BOOL m_iconFlag
Definition: CISFBand.h:33
virtual STDMETHODIMP GetSizeMax(OUT ULARGE_INTEGER *pcbSize)
Definition: CISFBand.cpp:314
virtual STDMETHODIMP GetBandInfoSFB(PBANDINFOSFB pbi)
Definition: CISFBand.cpp:456
virtual STDMETHODIMP OnWinEvent(HWND hWnd, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *theResult)
Definition: CISFBand.cpp:334
virtual STDMETHODIMP ContextSensitiveHelp(IN BOOL fEnterMode)
Definition: CISFBand.cpp:165
CComPtr< IShellFolder > m_pISF
Definition: CISFBand.h:28
virtual STDMETHODIMP Exec(IN const GUID *pguidCmdGroup, IN DWORD nCmdID, IN DWORD nCmdexecopt, IN VARIANT *pvaIn, IN OUT VARIANT *pvaOut)
Definition: CISFBand.cpp:430
virtual STDMETHODIMP GetBandInfo(IN DWORD dwBandID, IN DWORD dwViewMode, IN OUT DESKBANDINFO *pdbi)
Definition: CISFBand.cpp:209
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
static HWND hwndParent
Definition: cryptui.c:300
#define E_OUTOFMEMORY
Definition: ddrawi.h:100
#define E_INVALIDARG
Definition: ddrawi.h:101
#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
UINT uFlags
Definition: api.c:59
#define IDM_SMALL_ICONS
Definition: resource.h:69
#define IDM_POPUPMENU
Definition: resource.h:67
#define IDM_OPEN_FOLDER
Definition: resource.h:72
#define IDM_LARGE_ICONS
Definition: resource.h:68
#define IDM_SHOW_TEXT
Definition: resource.h:70
#define MAX_PATH
Definition: compat.h:34
@ VT_BSTR
Definition: compat.h:2303
#define FAILED_UNEXPECTEDLY(hr)
Definition: precomp.h:121
HMODULE WINAPI GetModuleHandleW(LPCWSTR lpModuleName)
Definition: loader.c:838
HRESULT WINAPI IUnknown_Exec(IUnknown *lpUnknown, REFGUID pguidCmdGroup, DWORD nCmdID, DWORD nCmdexecopt, VARIANT *pvaIn, VARIANT *pvaOut)
Definition: ordinal.c:1083
HRESULT WINAPI SHInvokeDefaultCommand(HWND hWnd, IShellFolder *lpFolder, LPCITEMIDLIST lpApidl)
Definition: ordinal.c:2977
HRESULT WINAPI IUnknown_GetWindow(IUnknown *lpUnknown, HWND *lphWnd)
Definition: ordinal.c:1332
#define MAKE_HRESULT(sev, fac, code)
Definition: dmerror.h:30
#define pt(x, y)
Definition: drawing.c:79
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLsizeiptr size
Definition: glext.h:5919
GLuint index
Definition: glext.h:6031
GLsizei GLenum const GLvoid GLsizei GLenum GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLint GLint GLint GLshort GLshort GLshort GLubyte GLubyte GLubyte GLuint GLuint GLuint GLushort GLushort GLushort GLbyte GLbyte GLbyte GLbyte GLdouble GLdouble GLdouble GLdouble GLfloat GLfloat GLfloat GLfloat GLint GLint GLint GLint GLshort GLshort GLshort GLshort GLubyte GLubyte GLubyte GLubyte GLuint GLuint GLuint GLuint GLushort GLushort GLushort GLushort GLboolean const GLdouble const GLfloat const GLint const GLshort const GLbyte const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLdouble const GLfloat const GLfloat const GLint const GLint const GLshort const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort const GLdouble const GLfloat const GLint const GLshort GLenum GLenum GLenum GLfloat GLenum GLint GLenum GLenum GLenum GLfloat GLenum GLenum GLint GLenum GLfloat GLenum GLint GLint GLushort GLenum GLenum GLfloat GLenum GLenum GLint GLfloat const GLubyte GLenum GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLint GLint GLsizei GLsizei GLint GLenum GLenum const GLvoid GLenum GLenum const GLfloat GLenum GLenum const GLint GLenum GLenum const GLdouble GLenum GLenum const GLfloat GLenum GLenum const GLint GLsizei GLuint GLfloat GLuint GLbitfield GLfloat GLint GLuint GLboolean GLenum GLfloat GLenum GLbitfield GLenum GLfloat GLfloat GLint GLint const GLfloat GLenum GLfloat GLfloat GLint GLint GLfloat GLfloat GLint GLint const GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat GLint GLfloat GLfloat const GLdouble const GLfloat const GLdouble const GLfloat GLint i
Definition: glfuncs.h:248
int WINAPI SHMapPIDLToSystemImageListIndex(IShellFolder *sh, LPCITEMIDLIST pidl, int *pIndex)
Definition: iconcache.cpp:769
VOID WINAPI CoTaskMemFree(LPVOID ptr)
Definition: ifs.c:442
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
HRESULT QueryInterface([in] REFIID riid, [out, iid_is(riid)] void **ppvObject)
#define S_OK
Definition: intsafe.h:52
#define FAILED(hr)
Definition: intsafe.h:51
if(dx< 0)
Definition: linetemp.h:194
static const WCHAR tb[]
Definition: suminfo.c:285
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:63
unsigned __int3264 UINT_PTR
Definition: mstsclib_h.h:274
_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 L(x)
Definition: ntvdm.h:50
#define V_VT(A)
Definition: oleauto.h:211
#define V_BSTR(A)
Definition: oleauto.h:226
#define LOWORD(l)
Definition: pedump.c:82
#define WS_CHILD
Definition: pedump.c:617
unsigned short USHORT
Definition: pedump.c:61
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:228
BOOL WINAPI ILGetDisplayNameEx(LPSHELLFOLDER psf, LPCITEMIDLIST pidl, LPVOID path, DWORD type)
Definition: pidl.c:162
#define TB_SETEXTENDEDSTYLE
Definition: commctrl.h:1190
#define TB_AUTOSIZE
Definition: commctrl.h:1137
#define BTNS_AUTOSIZE
Definition: commctrl.h:1004
#define TB_GETIDEALSIZE
Definition: commctrl.h:1284
#define TBSTYLE_LIST
Definition: commctrl.h:993
#define TBSTYLE_EX_MIXEDBUTTONS
Definition: commctrl.h:1012
#define TB_GETBUTTONSIZE
Definition: commctrl.h:1160
#define TB_INSERTBUTTONW
Definition: commctrl.h:1265
#define TB_SETIMAGELIST
Definition: commctrl.h:1150
#define TB_GETBUTTON
Definition: commctrl.h:1109
#define TB_GETMAXSIZE
Definition: commctrl.h:1189
#define CCS_NODIVIDER
Definition: commctrl.h:2248
#define TBSTATE_ENABLED
Definition: commctrl.h:974
#define TBSTYLE_FLAT
Definition: commctrl.h:992
#define NM_RCLICK
Definition: commctrl.h:133
struct tagNMMOUSE * LPNMMOUSE
#define TOOLBARCLASSNAME
Definition: commctrl.h:946
#define CCS_NORESIZE
Definition: commctrl.h:2245
#define TB_GETIMAGELIST
Definition: commctrl.h:1151
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
#define WM_NOTIFY
Definition: richedit.h:61
#define memset(x, y, z)
Definition: compat.h:39
#define SHIL_SMALL
Definition: shellapi.h:182
#define ShellExecuteEx
Definition: shellapi.h:691
#define SEE_MASK_IDLIST
Definition: shellapi.h:27
#define SHIL_LARGE
Definition: shellapi.h:181
HRESULT WINAPI SHGetImageList(int iImageList, REFIID riid, void **ppv)
Definition: shellord.c:2445
HRESULT hr
Definition: shlfolder.c:183
UINT WINAPI Shell_MergeMenus(HMENU hmDst, HMENU hmSrc, UINT uInsert, UINT uIDAdjust, UINT uIDAdjustMax, ULONG uFlags)
Definition: shlmenu.c:856
#define ISFB_MASK_STATE
Definition: shlobj.h:2769
#define ISFB_STATE_QLINKSMODE
Definition: shlobj.h:2772
#define MM_SUBMENUSHAVEIDS
Definition: shlobj.h:2514
#define ISFB_MASK_IDLIST
Definition: shlobj.h:2770
#define StrRetToBuf
Definition: shlwapi.h:1769
@ DBID_BANDINFOCHANGED
Definition: shobjidl.idl:2446
@ DBID_SETWINDOWTHEME
Definition: shobjidl.idl:2452
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
#define _countof(array)
Definition: sndvol32.h:68
#define TRACE(s)
Definition: solgame.cpp:4
#define true
Definition: stdbool.h:36
#define false
Definition: stdbool.h:37
STRSAFEAPI StringCchCopyW(STRSAFE_LPWSTR pszDest, size_t cchDest, STRSAFE_LPCWSTR pszSrc)
Definition: strsafe.h:149
LONG y
Definition: windef.h:330
LONG x
Definition: windef.h:329
Definition: inflate.c:139
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 DWORD_PTR
Definition: treelist.c:76
int32_t INT_PTR
Definition: typedefs.h:64
#define IN
Definition: typedefs.h:39
#define MAKELONG(a, b)
Definition: typedefs.h:249
uint32_t ULONG
Definition: typedefs.h:59
#define HIWORD(l)
Definition: typedefs.h:247
#define OUT
Definition: typedefs.h:40
#define ILGDN_INFOLDER
Definition: undocshell.h:70
HRESULT WINAPI SetWindowTheme(_In_ HWND hwnd, _In_ LPCWSTR pszSubAppName, _In_ LPCWSTR pszSubIdList)
Definition: uxthemesupp.c:69
#define _T(x)
Definition: vfdio.h:22
static HMENU hmenu
Definition: win.c:66
_Inout_ PERBANDINFO * pbi
Definition: winddi.h:3917
LONG_PTR LPARAM
Definition: windef.h:208
LONG_PTR LRESULT
Definition: windef.h:209
UINT_PTR WPARAM
Definition: windef.h:207
#define WINAPI
Definition: msvc.h:6
#define GET_Y_LPARAM(lp)
Definition: windowsx.h:300
#define GET_X_LPARAM(lp)
Definition: windowsx.h:299
#define S_FALSE
Definition: winerror.h:2357
#define SEVERITY_SUCCESS
Definition: winerror.h:64
#define E_POINTER
Definition: winerror.h:2365
#define SW_SHOWNORMAL
Definition: winuser.h:769
#define CreateWindowEx
Definition: winuser.h:5754
HMENU WINAPI CreatePopupMenu(void)
Definition: menu.c:838
#define SW_HIDE
Definition: winuser.h:767
#define MF_BYCOMMAND
Definition: winuser.h:202
BOOL WINAPI ShowWindow(_In_ HWND, _In_ int)
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
#define WM_COMMAND
Definition: winuser.h:1739
#define TPM_BOTTOMALIGN
Definition: winuser.h:2384
#define VK_CONTROL
Definition: winuser.h:2202
BOOL WINAPI DeleteMenu(_In_ HMENU, _In_ UINT, _In_ UINT)
#define MF_CHECKED
Definition: winuser.h:132
BOOL WINAPI TrackPopupMenuEx(_In_ HMENU, _In_ UINT, _In_ int, _In_ int, _In_ HWND, _In_opt_ LPTPMPARAMS)
#define MF_UNCHECKED
Definition: winuser.h:204
DWORD WINAPI CheckMenuItem(_In_ HMENU, _In_ UINT, _In_ UINT)
HMENU WINAPI GetSubMenu(_In_ HMENU, _In_ int)
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)
#define TPM_LEFTALIGN
Definition: winuser.h:2376
#define SendMessage
Definition: winuser.h:5842
#define LoadMenu
Definition: winuser.h:5816
#define CW_USEDEFAULT
Definition: winuser.h:225
#define MAKEINTRESOURCEA(i)
Definition: winuser.h:581
BOOL WINAPI DestroyMenu(_In_ HMENU)
#define VK_SHIFT
Definition: winuser.h:2201
#define SW_SHOW
Definition: winuser.h:774
#define TPM_RETURNCMD
Definition: winuser.h:2386
BOOL WINAPI DestroyWindow(_In_ HWND)
#define MAKEINTRESOURCE
Definition: winuser.h:591
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
SHORT WINAPI GetKeyState(_In_ int)
#define IID_PPV_ARG(Itype, ppType)
#define IID_NULL_PPV_ARG(Itype, ppType)
char * LPSTR
Definition: xmlstorage.h:182
__wchar_t WCHAR
Definition: xmlstorage.h:180