ReactOS 0.4.16-dev-2332-g4cba65d
filedlgbrowser.c
Go to the documentation of this file.
1/*
2 * Implementation of IShellBrowser for the File Open common dialog
3 *
4 * Copyright 1999 Francois Boisvert
5 * Copyright 1999, 2000 Juergen Schmied
6 *
7 * This library is free software; you can redistribute it and/or
8 * modify it under the terms of the GNU Lesser General Public
9 * License as published by the Free Software Foundation; either
10 * version 2.1 of the License, or (at your option) any later version.
11 *
12 * This library is distributed in the hope that it will be useful,
13 * but WITHOUT ANY WARRANTY; without even the implied warranty of
14 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
15 * Lesser General Public License for more details.
16 *
17 * You should have received a copy of the GNU Lesser General Public
18 * License along with this library; if not, write to the Free Software
19 * Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301, USA
20 */
21
22#include <stdarg.h>
23#include <stdio.h>
24#include <string.h>
25
26#define COBJMACROS
27#define NONAMELESSUNION
28
29#include "windef.h"
30#include "winbase.h"
31#include "winnls.h"
32#include "wingdi.h"
33#include "winuser.h"
34#include "winreg.h"
35
36#define NO_SHLWAPI_STREAM
37#include "shlwapi.h"
38#include "filedlgbrowser.h"
39#include "cdlg.h"
40#include "shlguid.h"
41#include "servprov.h"
42#include "wine/debug.h"
43#include "wine/heap.h"
44#ifdef __REACTOS__
46#endif
47
49
50typedef struct
51{
52
56 LONG ref; /* Reference counter */
57 HWND hwndOwner; /* Owner dialog of the interface */
58
60
62{
63 return CONTAINING_RECORD(iface, IShellBrowserImpl, IShellBrowser_iface);
64}
65
67{
68 return CONTAINING_RECORD(iface, IShellBrowserImpl, ICommDlgBrowser_iface);
69}
70
72{
73 return CONTAINING_RECORD(iface, IShellBrowserImpl, IServiceProvider_iface);
74}
75
76/**************************************************************************
77* vtable
78*/
79static const IShellBrowserVtbl IShellBrowserImpl_Vtbl;
80static const ICommDlgBrowserVtbl IShellBrowserImpl_ICommDlgBrowser_Vtbl;
81static const IServiceProviderVtbl IShellBrowserImpl_IServiceProvider_Vtbl;
82
83/*
84 * Helper functions
85 */
86
87#define add_flag(a) if (flags & a) {strcat(str, #a );strcat(str," ");}
88static void COMDLG32_DumpSBSPFlags(UINT uflags)
89{
90 if (TRACE_ON(commdlg))
91 {
92 unsigned int i;
93 static const struct {
94 DWORD mask;
95 const char *name;
96 } flags[] = {
97#define FE(x) { x, #x}
98 /* SBSP_DEFBROWSER == 0 */
99 FE(SBSP_SAMEBROWSER),
100 FE(SBSP_NEWBROWSER),
101
102 /* SBSP_DEFMODE == 0 */
103 FE(SBSP_OPENMODE),
104 FE(SBSP_EXPLOREMODE),
105 FE(SBSP_HELPMODE),
106 FE(SBSP_NOTRANSFERHIST),
107
108 /* SBSP_ABSOLUTE == 0 */
109 FE(SBSP_RELATIVE),
110 FE(SBSP_PARENT),
111 FE(SBSP_NAVIGATEBACK),
112 FE(SBSP_NAVIGATEFORWARD),
113 FE(SBSP_ALLOW_AUTONAVIGATE),
114
115 FE(SBSP_NOAUTOSELECT),
116 FE(SBSP_WRITENOHISTORY),
117
118 FE(SBSP_REDIRECT),
119 FE(SBSP_INITIATEDBYHLINKFRAME),
120 };
121#undef FE
122 TRACE("SBSP Flags: %08x =", uflags);
123 for (i = 0; i < ARRAY_SIZE(flags); i++)
124 if (flags[i].mask & uflags)
125 TRACE("%s ", flags[i].name);
126 TRACE("\n");
127 }
128}
129
130static void COMDLG32_UpdateCurrentDir(const FileOpenDlgInfos *fodInfos)
131{
132 LPSHELLFOLDER psfDesktop;
133 STRRET strret;
134 HRESULT res;
135
136 res = SHGetDesktopFolder(&psfDesktop);
137 if (FAILED(res))
138 return;
139
140 res = IShellFolder_GetDisplayNameOf(psfDesktop, fodInfos->ShellInfos.pidlAbsCurrent,
141 SHGDN_FORPARSING, &strret);
142 if (SUCCEEDED(res)) {
143 WCHAR wszCurrentDir[MAX_PATH];
144
145 res = StrRetToBufW(&strret, fodInfos->ShellInfos.pidlAbsCurrent, wszCurrentDir, MAX_PATH);
146 if (SUCCEEDED(res))
147 SetCurrentDirectoryW(wszCurrentDir);
148 }
149#ifdef __REACTOS__
150 DoUpdateAutoCompleteWithCWD(fodInfos, fodInfos->ShellInfos.pidlAbsCurrent);
151#endif
152
153 IShellFolder_Release(psfDesktop);
154}
155
156/* copied from shell32 to avoid linking to it */
158{
159 TRACE("dest=%p len=0x%x strret=%p pidl=%p\n", dest , len, src, pidl);
160
161 switch (src->uType)
162 {
163 case STRRET_WSTR:
164 lstrcpynW(dest, src->u.pOleStr, len);
165 CoTaskMemFree(src->u.pOleStr);
166 break;
167
168 case STRRET_CSTR:
169 if (len && !MultiByteToWideChar( CP_ACP, 0, src->u.cStr, -1, dest, len ))
170 ((LPWSTR)dest)[len-1] = 0;
171 break;
172
173 case STRRET_OFFSET:
174 if (pidl)
175 {
176 if (len && !MultiByteToWideChar( CP_ACP, 0, ((LPCSTR)&pidl->mkid)+src->u.uOffset,
177 -1, dest, len ))
178 ((LPWSTR)dest)[len-1] = 0;
179 }
180 break;
181
182 default:
183 FIXME("unknown type!\n");
184 if (len)
185 { *(LPWSTR)dest = '\0';
186 }
187 return(FALSE);
188 }
189 return TRUE;
190}
191
192/*
193 * IShellBrowser
194 */
195
196/**************************************************************************
197* IShellBrowserImpl_Construct
198*/
200{
201 FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndOwner);
203
204 sb = heap_alloc(sizeof(*sb));
205
206 /* Initialisation of the member variables */
207 sb->ref=1;
208 sb->hwndOwner = hwndOwner;
209
210 /* Initialisation of the vTables */
211 sb->IShellBrowser_iface.lpVtbl = &IShellBrowserImpl_Vtbl;
212 sb->ICommDlgBrowser_iface.lpVtbl = &IShellBrowserImpl_ICommDlgBrowser_Vtbl;
213 sb->IServiceProvider_iface.lpVtbl = &IShellBrowserImpl_IServiceProvider_Vtbl;
215 &fodInfos->ShellInfos.pidlAbsCurrent);
216
217 TRACE("%p\n", sb);
218
219 return &sb->IShellBrowser_iface;
220}
221
222/***************************************************************************
223* IShellBrowserImpl_QueryInterface
224*/
226{
228
229 TRACE("(%p)->(%s, %p)\n", This, debugstr_guid(riid), ppvObj);
230
231 *ppvObj = NULL;
232
234 *ppvObj = &This->IShellBrowser_iface;
235 else if(IsEqualIID(riid, &IID_IOleWindow))
236 *ppvObj = &This->IShellBrowser_iface;
237 else if(IsEqualIID(riid, &IID_IShellBrowser))
238 *ppvObj = &This->IShellBrowser_iface;
239 else if(IsEqualIID(riid, &IID_ICommDlgBrowser))
240 *ppvObj = &This->ICommDlgBrowser_iface;
241 else if(IsEqualIID(riid, &IID_IServiceProvider))
242 *ppvObj = &This->IServiceProvider_iface;
243
244 if(*ppvObj) {
245 IUnknown_AddRef((IUnknown*)*ppvObj);
246 return S_OK;
247 }
248
249#ifdef __REACTOS__
250 TRACE("unsupported interface, %s\n", debugstr_guid(riid));
251#else
252 FIXME("unsupported interface, %s\n", debugstr_guid(riid));
253#endif
254 return E_NOINTERFACE;
255}
256
257/**************************************************************************
258* IShellBrowser::AddRef
259*/
261{
264
265 TRACE("(%p,%u)\n", This, ref - 1);
266
267 return ref;
268}
269
270/**************************************************************************
271* IShellBrowserImpl_Release
272*/
274{
277
278 TRACE("(%p,%u)\n", This, ref + 1);
279
280 if (!ref)
282
283 return ref;
284}
285
286/*
287 * IOleWindow
288 */
289
290/**************************************************************************
291* IShellBrowserImpl_GetWindow (IOleWindow)
292*
293* Inherited from IOleWindow::GetWindow
294*
295* See Windows documentation for more details
296*
297* Note : We will never be window less in the File Open dialog
298*
299*/
301 HWND * phwnd)
302{
304
305 TRACE("(%p)\n", This);
306
307 if(!This->hwndOwner)
308 return E_FAIL;
309
310 *phwnd = This->hwndOwner;
311
312 return (*phwnd) ? S_OK : E_UNEXPECTED;
313
314}
315
316/**************************************************************************
317* IShellBrowserImpl_ContextSensitiveHelp
318*/
320 BOOL fEnterMode)
321{
323
324 TRACE("(%p)\n", This);
325
326 /* Feature not implemented */
327 return E_NOTIMPL;
328}
329
330/*
331 * IShellBrowser
332 */
333
334/**************************************************************************
335* IShellBrowserImpl_BrowseObject
336*
337* See Windows documentation on IShellBrowser::BrowseObject for more details
338*
339* This function will override user specified flags and will always
340* use SBSP_DEFBROWSER and SBSP_DEFMODE.
341*/
343 LPCITEMIDLIST pidl,
344 UINT wFlags)
345{
346 HRESULT hRes;
348 IShellView *psvTmp;
349 FileOpenDlgInfos *fodInfos;
350 LPITEMIDLIST pidlTmp;
351 HWND hwndView;
352 HWND hDlgWnd;
353 BOOL bViewHasFocus;
354 RECT rectView;
355
357
358 TRACE("(%p)(pidl=%p,flags=0x%08x)\n", This, pidl, wFlags);
360
361 fodInfos = get_filedlg_infoptr(This->hwndOwner);
362
363 /* Format the pidl according to its parameter's category */
364 if(wFlags & SBSP_RELATIVE)
365 {
366
367 /* SBSP_RELATIVE A relative pidl (relative from the current folder) */
368 if (FAILED(hRes = IShellFolder_BindToObject(fodInfos->Shell.FOIShellFolder,
369 pidl, NULL, &IID_IShellFolder, (void **)&folder)))
370 {
371 ERR("bind to object failed\n");
372 return hRes;
373 }
374 /* create an absolute pidl */
375 pidlTmp = ILCombine(fodInfos->ShellInfos.pidlAbsCurrent, pidl);
376 }
377 else if(wFlags & SBSP_PARENT)
378 {
379 /* Browse the parent folder (ignores the pidl) */
380 pidlTmp = GetParentPidl(fodInfos->ShellInfos.pidlAbsCurrent);
382 }
383 else /* SBSP_ABSOLUTE is 0x0000 */
384 {
385 /* An absolute pidl (relative from the desktop) */
386 pidlTmp = ILClone(pidl);
388 }
389
390 if (!folder)
391 {
392 ERR("could not browse to folder\n");
393 ILFree(pidlTmp);
394 return E_FAIL;
395 }
396
397 /* If the pidl to browse to is equal to the actual pidl ...
398 do nothing and pretend you did it*/
399 if (ILIsEqual(pidlTmp, fodInfos->ShellInfos.pidlAbsCurrent))
400 {
401 IShellFolder_Release(folder);
402 ILFree(pidlTmp);
403 TRACE("keep current folder\n");
404 return S_OK;
405 }
406
407 /* Release the current DataObject */
408 if (fodInfos->Shell.FOIDataObject)
409 {
410 IDataObject_Release(fodInfos->Shell.FOIDataObject);
411 fodInfos->Shell.FOIDataObject = NULL;
412 }
413
414 /* Create the associated view */
415 TRACE("create view object\n");
416 if (FAILED(hRes = IShellFolder_CreateViewObject(folder, fodInfos->ShellInfos.hwndOwner,
417 &IID_IShellView, (void **)&psvTmp)))
418 {
419 IShellFolder_Release(folder);
420 ILFree(pidlTmp);
421 return hRes;
422 }
423
424 /* Check if listview has focus */
425 bViewHasFocus = IsChild(fodInfos->ShellInfos.hwndView,GetFocus());
426
427 /* Get the foldersettings from the old view */
428 if(fodInfos->Shell.FOIShellView)
429 IShellView_GetCurrentInfo(fodInfos->Shell.FOIShellView, &fodInfos->ShellInfos.folderSettings);
430
431 /* Release the old fodInfos->Shell.FOIShellView and update its value.
432 We have to update this early since ShellView_CreateViewWindow of native
433 shell32 calls OnStateChange and needs the correct view here.*/
434 if(fodInfos->Shell.FOIShellView)
435 {
436 IShellView_DestroyViewWindow(fodInfos->Shell.FOIShellView);
437 IShellView_Release(fodInfos->Shell.FOIShellView);
438 }
439 fodInfos->Shell.FOIShellView = psvTmp;
440
441 /* Release old FOIShellFolder and update its value */
442 if (fodInfos->Shell.FOIShellFolder)
443 IShellFolder_Release(fodInfos->Shell.FOIShellFolder);
444 fodInfos->Shell.FOIShellFolder = folder;
445
446 /* Release old pidlAbsCurrent and update its value */
447 ILFree(fodInfos->ShellInfos.pidlAbsCurrent);
448 fodInfos->ShellInfos.pidlAbsCurrent = pidlTmp;
449
451
452 GetWindowRect(GetDlgItem(This->hwndOwner, IDC_SHELLSTATIC), &rectView);
453 MapWindowPoints(0, This->hwndOwner, (LPPOINT)&rectView, 2);
454
455 /* Create the window */
456 TRACE("create view window\n");
457 if (FAILED(hRes = IShellView_CreateViewWindow(psvTmp, NULL,
458 &fodInfos->ShellInfos.folderSettings, fodInfos->Shell.FOIShellBrowser,
459 &rectView, &hwndView)))
460 {
461 WARN("Failed to create view window, hr %#x.\n", hRes);
462 return hRes;
463 }
464
465 fodInfos->ShellInfos.hwndView = hwndView;
466
467 /* Set view window control id to 5002 */
468 SetWindowLongPtrW(hwndView, GWLP_ID, lst2);
469 SendMessageW( hwndView, WM_SETFONT, SendMessageW( GetParent(hwndView), WM_GETFONT, 0, 0 ), FALSE );
470
471 /* Select the new folder in the Look In combo box of the Open file dialog */
472 FILEDLG95_LOOKIN_SelectItem(fodInfos->DlgInfos.hwndLookInCB,fodInfos->ShellInfos.pidlAbsCurrent);
473
474 /* changes the tab order of the ListView to reflect the window's File Dialog */
475 hDlgWnd = GetDlgItem(GetParent(hwndView), IDC_LOOKIN);
476 SetWindowPos(hwndView, hDlgWnd, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
477
478 /* Since we destroyed the old view if it had focus set focus to the newly created view */
479 if (bViewHasFocus)
480 SetFocus(fodInfos->ShellInfos.hwndView);
481
482 return hRes;
483}
484
485/**************************************************************************
486* IShellBrowserImpl_EnableModelessSB
487*/
489 BOOL fEnable)
490
491{
493
494 TRACE("(%p)\n", This);
495
496 /* Feature not implemented */
497 return E_NOTIMPL;
498}
499
500/**************************************************************************
501* IShellBrowserImpl_GetControlWindow
502*/
504 UINT id,
505 HWND *lphwnd)
506
507{
509
510 TRACE("(%p)\n", This);
511
512 /* Feature not implemented */
513 return E_NOTIMPL;
514}
515
516/**************************************************************************
517* IShellBrowserImpl_GetViewStateStream
518*/
520 DWORD grfMode,
521 LPSTREAM *ppStrm)
522
523{
525
526 FIXME("(%p 0x%08x %p)\n", This, grfMode, ppStrm);
527
528 /* Feature not implemented */
529 return E_NOTIMPL;
530}
531
532/**************************************************************************
533* IShellBrowserImpl_InsertMenusSB
534*/
536 HMENU hmenuShared,
537 LPOLEMENUGROUPWIDTHS lpMenuWidths)
538
539{
541
542 TRACE("(%p)\n", This);
543
544 /* Feature not implemented */
545 return E_NOTIMPL;
546}
547
548/**************************************************************************
549* IShellBrowserImpl_OnViewWindowActive
550*/
552 IShellView *ppshv)
553
554{
556
557 TRACE("(%p)\n", This);
558
559 /* Feature not implemented */
560 return E_NOTIMPL;
561}
562
563/**************************************************************************
564* IShellBrowserImpl_QueryActiveShellView
565*/
567 IShellView **ppshv)
568
569{
571
572 FileOpenDlgInfos *fodInfos;
573
574 TRACE("(%p)\n", This);
575
576 fodInfos = get_filedlg_infoptr(This->hwndOwner);
577
578 if(!(*ppshv = fodInfos->Shell.FOIShellView))
579 {
580 return E_FAIL;
581 }
582 IShellView_AddRef(fodInfos->Shell.FOIShellView);
583 return NOERROR;
584}
585
586/**************************************************************************
587* IShellBrowserImpl_RemoveMenusSB
588*/
590 HMENU hmenuShared)
591
592{
594
595 TRACE("(%p)\n", This);
596
597 /* Feature not implemented */
598 return E_NOTIMPL;
599}
600
601/**************************************************************************
602* IShellBrowserImpl_SendControlMsg
603*/
605 UINT id,
606 UINT uMsg,
609 LRESULT *pret)
610
611{
613 LRESULT lres;
614
615 TRACE("(%p)->(0x%08x 0x%08x 0x%08lx 0x%08lx %p)\n", This, id, uMsg, wParam, lParam, pret);
616
617 switch (id)
618 {
619 case FCW_TOOLBAR:
620 lres = SendDlgItemMessageA( This->hwndOwner, IDC_TOOLBAR, uMsg, wParam, lParam);
621 break;
622 default:
623#ifdef __REACTOS__
624 TRACE("ctrl id: %x\n", id);
625#else
626 FIXME("ctrl id: %x\n", id);
627#endif
628 return E_NOTIMPL;
629 }
630 if (pret) *pret = lres;
631 return S_OK;
632}
633
634/**************************************************************************
635* IShellBrowserImpl_SetMenuSB
636*/
638 HMENU hmenuShared,
639 HOLEMENU holemenuReserved,
640 HWND hwndActiveObject)
641
642{
644
645 TRACE("(%p)\n", This);
646
647 /* Feature not implemented */
648 return E_NOTIMPL;
649}
650
651/**************************************************************************
652* IShellBrowserImpl_SetStatusTextSB
653*/
655 LPCOLESTR lpszStatusText)
656
657{
659
660 TRACE("(%p)\n", This);
661
662 /* Feature not implemented */
663 return E_NOTIMPL;
664}
665
666/**************************************************************************
667* IShellBrowserImpl_SetToolbarItems
668*/
670 LPTBBUTTON lpButtons,
671 UINT nButtons,
672 UINT uFlags)
673
674{
676
677 TRACE("(%p)\n", This);
678
679 /* Feature not implemented */
680 return E_NOTIMPL;
681}
682
683/**************************************************************************
684* IShellBrowserImpl_TranslateAcceleratorSB
685*/
687 LPMSG lpmsg,
688 WORD wID)
689
690{
692
693 TRACE("(%p)\n", This);
694
695 /* Feature not implemented */
696 return E_NOTIMPL;
697}
698
699static const IShellBrowserVtbl IShellBrowserImpl_Vtbl =
700{
701 /* IUnknown */
705 /* IOleWindow */
708 /* IShellBrowser */
722};
723
724
725
726/*
727 * ICommDlgBrowser
728 */
729
730/***************************************************************************
731* IShellBrowserImpl_ICommDlgBrowser_QueryInterface
732*/
734 ICommDlgBrowser *iface,
735 REFIID riid,
736 LPVOID *ppvObj)
737{
739
740 TRACE("(%p)\n", This);
741
742 return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppvObj);
743}
744
745/**************************************************************************
746* IShellBrowserImpl_ICommDlgBrowser_AddRef
747*/
749{
751
752 TRACE("(%p)\n", This);
753
754 return IShellBrowserImpl_AddRef(&This->IShellBrowser_iface);
755}
756
757/**************************************************************************
758* IShellBrowserImpl_ICommDlgBrowser_Release
759*/
761{
763
764 TRACE("(%p)\n", This);
765
766 return IShellBrowserImpl_Release(&This->IShellBrowser_iface);
767}
768
769/**************************************************************************
770* IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand
771*
772* Called when a user double-clicks in the view or presses the ENTER key
773*/
775 IShellView *ppshv)
776{
777 LPITEMIDLIST pidl;
778 FileOpenDlgInfos *fodInfos;
779
781
782 TRACE("(%p)\n", This);
783
784 fodInfos = get_filedlg_infoptr(This->hwndOwner);
785
786 /* If the selected object is not a folder, send an IDOK command to parent window */
787 if((pidl = GetPidlFromDataObject(fodInfos->Shell.FOIDataObject, 1)))
788 {
789 HRESULT hRes;
790
791 ULONG ulAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER | SFGAO_FILESYSANCESTOR;
792 IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, (LPCITEMIDLIST *)&pidl, &ulAttr);
793 if ((ulAttr & (SFGAO_FOLDER | SFGAO_HASSUBFOLDER)) && (ulAttr & SFGAO_FILESYSANCESTOR))
794 {
795 hRes = IShellBrowser_BrowseObject(&This->IShellBrowser_iface,pidl,SBSP_RELATIVE);
796 if(fodInfos->ofnInfos->Flags & OFN_EXPLORER)
798 }
799 else
800 {
801 /* Tell the dialog that the user selected a file */
802 PostMessageA(This->hwndOwner, WM_COMMAND, IDOK, 0L);
803 hRes = S_OK;
804 }
805
806 ILFree(pidl);
807
808 return hRes;
809 }
810
811 return E_FAIL;
812}
813
814/**************************************************************************
815* IShellBrowserImpl_OnSelChange
816*/
818{
819 FileOpenDlgInfos *fodInfos;
820
821 fodInfos = get_filedlg_infoptr(This->hwndOwner);
822 TRACE("(%p do=%p view=%p)\n", This, fodInfos->Shell.FOIDataObject, fodInfos->Shell.FOIShellView);
823
824 /* release old selections */
825 if (fodInfos->Shell.FOIDataObject)
826 IDataObject_Release(fodInfos->Shell.FOIDataObject);
827
828 /* get a new DataObject from the ShellView */
829 if(FAILED(IShellView_GetItemObject(fodInfos->Shell.FOIShellView, SVGIO_SELECTION,
830 &IID_IDataObject, (void**)&fodInfos->Shell.FOIDataObject)))
831 return E_FAIL;
832
834
835 if(fodInfos->ofnInfos->Flags & OFN_EXPLORER)
837 return S_OK;
838}
839
840/**************************************************************************
841* IShellBrowserImpl_ICommDlgBrowser_OnStateChange
842*/
844 IShellView *ppshv,
845 ULONG uChange)
846{
847
849
850 TRACE("(%p shv=%p)\n", This, ppshv);
851
852 switch (uChange)
853 {
854 case CDBOSC_SETFOCUS:
855 /* FIXME: Reset the default button.
856 This should be taken care of by defdlg. If control
857 other than button receives focus the default button
858 should be restored. */
859 SendMessageA(This->hwndOwner, DM_SETDEFID, IDOK, 0);
860
861 break;
862 case CDBOSC_KILLFOCUS:
863 {
864 FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(This->hwndOwner);
865 if(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
866 {
867 WCHAR szSave[16];
869 SetDlgItemTextW(fodInfos->ShellInfos.hwndOwner, IDOK, szSave);
870 }
871 }
872 break;
873 case CDBOSC_SELCHANGE:
874 return IShellBrowserImpl_OnSelChange(This, ppshv);
875 case CDBOSC_RENAME:
876 /* nothing to do */
877 break;
878 }
879
880 return NOERROR;
881}
882
883/* send_includeitem_notification
884 *
885 * Sends a CDN_INCLUDEITEM notification for "pidl" to hwndParentDlg
886 */
888{
889 LRESULT hook_result = 0;
890 FileOpenDlgInfos *fodInfos = get_filedlg_infoptr(hwndParentDlg);
891
892 if(!fodInfos) return 0;
893
894 if(fodInfos->DlgInfos.hwndCustomDlg)
895 {
896 TRACE("call notify CDN_INCLUDEITEM for pidl=%p\n", pidl);
897 if(fodInfos->unicode)
898 {
899 OFNOTIFYEXW ofnNotify;
900 ofnNotify.psf = fodInfos->Shell.FOIShellFolder;
901 ofnNotify.pidl = (LPITEMIDLIST)pidl;
902 ofnNotify.hdr.hwndFrom = hwndParentDlg;
903 ofnNotify.hdr.idFrom = 0;
904 ofnNotify.hdr.code = CDN_INCLUDEITEM;
905 ofnNotify.lpOFN = fodInfos->ofnInfos;
906 hook_result = SendMessageW(fodInfos->DlgInfos.hwndCustomDlg, WM_NOTIFY, 0, (LPARAM)&ofnNotify);
907 }
908 else
909 {
910 OFNOTIFYEXA ofnNotify;
911 ofnNotify.psf = fodInfos->Shell.FOIShellFolder;
912 ofnNotify.pidl = (LPITEMIDLIST)pidl;
913 ofnNotify.hdr.hwndFrom = hwndParentDlg;
914 ofnNotify.hdr.idFrom = 0;
915 ofnNotify.hdr.code = CDN_INCLUDEITEM;
916 ofnNotify.lpOFN = (LPOPENFILENAMEA)fodInfos->ofnInfos;
917 hook_result = SendMessageA(fodInfos->DlgInfos.hwndCustomDlg, WM_NOTIFY, 0, (LPARAM)&ofnNotify);
918 }
919 }
920 TRACE("Retval: 0x%08lx\n", hook_result);
921 return hook_result;
922}
923
924/**************************************************************************
925* IShellBrowserImpl_ICommDlgBrowser_IncludeObject
926*/
928 IShellView * ppshv,
929 LPCITEMIDLIST pidl)
930{
931 FileOpenDlgInfos *fodInfos;
932 ULONG ulAttr;
933 STRRET str;
934 WCHAR szPathW[MAX_PATH];
935
937
938 TRACE("(%p)\n", This);
939
940 fodInfos = get_filedlg_infoptr(This->hwndOwner);
941
942 ulAttr = SFGAO_HIDDEN | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR | SFGAO_LINK;
943 IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, &pidl, &ulAttr);
944
945 if( (ulAttr & SFGAO_HIDDEN) || /* hidden */
946 !(ulAttr & (SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR))) /* special folder */
947 return S_FALSE;
948
949 /* always include directories and links */
950 if(ulAttr & (SFGAO_FOLDER | SFGAO_LINK))
951 return S_OK;
952
953 /* if the application takes care of including the item we are done */
954 if(fodInfos->ofnInfos->Flags & OFN_ENABLEINCLUDENOTIFY &&
955 send_includeitem_notification(This->hwndOwner, pidl))
956 return S_OK;
957
958 /* Check if there is a mask to apply if not */
959 if(!fodInfos->ShellInfos.lpstrCurrentFilter || !fodInfos->ShellInfos.lpstrCurrentFilter[0])
960 return S_OK;
961
962 if (SUCCEEDED(IShellFolder_GetDisplayNameOf(fodInfos->Shell.FOIShellFolder, pidl, SHGDN_INFOLDER | SHGDN_FORPARSING, &str)))
963 {
964 if (COMDLG32_StrRetToStrNW(szPathW, MAX_PATH, &str, pidl))
965 {
966 if (PathMatchSpecW(szPathW, fodInfos->ShellInfos.lpstrCurrentFilter))
967 return S_OK;
968 }
969 }
970 return S_FALSE;
971
972}
973
974static const ICommDlgBrowserVtbl IShellBrowserImpl_ICommDlgBrowser_Vtbl =
975{
976 /* IUnknown */
980 /* ICommDlgBrowser */
984};
985
986
987
988
989/*
990 * IServiceProvider
991 */
992
993/***************************************************************************
994* IShellBrowserImpl_IServiceProvider_QueryInterface
995*/
997 IServiceProvider *iface,
998 REFIID riid,
999 LPVOID *ppvObj)
1000{
1002
1003 FIXME("(%p)\n", This);
1004
1005 return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppvObj);
1006}
1007
1008/**************************************************************************
1009* IShellBrowserImpl_IServiceProvider_AddRef
1010*/
1012{
1014
1015 FIXME("(%p)\n", This);
1016
1017 return IShellBrowserImpl_AddRef(&This->IShellBrowser_iface);
1018}
1019
1020/**************************************************************************
1021* IShellBrowserImpl_IServiceProvider_Release
1022*/
1024{
1026
1027 FIXME("(%p)\n", This);
1028
1029 return IShellBrowserImpl_Release(&This->IShellBrowser_iface);
1030}
1031
1032/**************************************************************************
1033* IShellBrowserImpl_IServiceProvider_Release
1034*
1035* NOTES
1036* the w2k shellview asks for (guidService = SID_STopLevelBrowser,
1037* riid = IShellBrowser) to call SendControlMsg ().
1038*
1039* FIXME
1040* this is a hack!
1041*/
1042
1044 IServiceProvider * iface,
1045 REFGUID guidService,
1046 REFIID riid,
1047 void** ppv)
1048{
1050
1051 FIXME("(%p)\n\t%s\n\t%s\n", This,debugstr_guid(guidService), debugstr_guid(riid) );
1052
1053 *ppv = NULL;
1054 if(guidService && IsEqualIID(guidService, &SID_STopLevelBrowser))
1055 return IShellBrowserImpl_QueryInterface(&This->IShellBrowser_iface,riid,ppv);
1056
1057 FIXME("(%p) unknown interface requested\n", This);
1058 return E_NOINTERFACE;
1059
1060}
1061
1062static const IServiceProviderVtbl IShellBrowserImpl_IServiceProvider_Vtbl =
1063{
1064 /* IUnknown */
1068 /* IServiceProvider */
1070};
HRESULT WINAPI SHGetDesktopFolder(IShellFolder **psf)
static void * heap_alloc(size_t len)
Definition: appwiz.h:66
static BOOL heap_free(void *mem)
Definition: appwiz.h:76
#define InterlockedIncrement
Definition: armddk.h:53
#define InterlockedDecrement
Definition: armddk.h:52
#define WINE_DEFAULT_DEBUG_CHANNEL(t)
Definition: precomp.h:23
#define ARRAY_SIZE(A)
Definition: main.h:20
#define FIXME(fmt,...)
Definition: precomp.h:53
#define WARN(fmt,...)
Definition: precomp.h:61
#define ERR(fmt,...)
Definition: precomp.h:57
#define EXTERN_C
Definition: basetyps.h:12
const GUID IID_IUnknown
DECLSPEC_HIDDEN HINSTANCE COMDLG32_hInstance
Definition: cdlg32.c:42
#define IDS_SAVE_BUTTON
Definition: cdlg.h:177
WPARAM wParam
Definition: combotst.c:138
LPARAM lParam
Definition: combotst.c:139
EXTERN_C HRESULT DoUpdateAutoCompleteWithCWD(const FileOpenDlgInfos *info, LPCITEMIDLIST pidl)
Definition: autocomp.cpp:63
#define OFN_EXPLORER
Definition: commdlg.h:104
#define CDN_SELCHANGE
Definition: commdlg.h:34
struct tagOFNA * LPOPENFILENAMEA
#define OFN_ENABLEINCLUDENOTIFY
Definition: commdlg.h:100
#define CDN_INCLUDEITEM
Definition: commdlg.h:40
#define CDN_FOLDERCHANGE
Definition: commdlg.h:35
#define E_NOTIMPL
Definition: ddrawi.h:99
#define E_FAIL
Definition: ddrawi.h:102
#define lst2
Definition: dlgs.h:96
#define NULL
Definition: types.h:112
#define TRUE
Definition: types.h:120
#define FALSE
Definition: types.h:117
UINT uFlags
Definition: api.c:59
LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl)
Definition: filedlg.c:4584
void FILEDLG95_FILENAME_FillFromSelection(HWND hwnd)
Definition: filedlg.c:4303
FileOpenDlgInfos * get_filedlg_infoptr(HWND hwnd)
Definition: filedlg.c:229
IShellFolder * GetShellFolderFromPidl(LPITEMIDLIST pidlAbs)
Definition: filedlg.c:4556
LRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode)
Definition: filedlg.c:1086
LPITEMIDLIST GetPidlFromDataObject(IDataObject *doSelected, UINT nPidlIndex)
Definition: filedlg.c:4461
int FILEDLG95_LOOKIN_SelectItem(HWND hwnd, LPITEMIDLIST pidl)
Definition: filedlg.c:4149
#define CP_ACP
Definition: compat.h:109
#define TRACE_ON(x)
Definition: compat.h:75
#define MAX_PATH
Definition: compat.h:34
#define MultiByteToWideChar
Definition: compat.h:110
#define lstrcpynW
Definition: compat.h:738
BOOL WINAPI SetCurrentDirectoryW(IN LPCWSTR lpPathName)
Definition: path.c:2168
BOOL WINAPI PathMatchSpecW(const WCHAR *path, const WCHAR *mask)
Definition: path.c:2521
INT WINAPI DECLSPEC_HOTPATCH LoadStringW(HINSTANCE instance, UINT resource_id, LPWSTR buffer, INT buflen)
Definition: string.c:1220
HRESULT WINAPI SHGetSpecialFolderLocation(HWND hwndOwner, INT nFolder, LPITEMIDLIST *ppidl)
Definition: shellpath.c:3384
HRESULT WINAPI StrRetToBufW(LPSTRRET src, const ITEMIDLIST *pidl, LPWSTR dest, UINT len)
Definition: string.c:1660
#define IShellFolder_GetDisplayNameOf
Definition: utils.cpp:13
#define L(x)
Definition: resources.c:13
superblock * sb
Definition: btrfs.c:4261
static HRESULT WINAPI IShellBrowserImpl_SetToolbarItems(IShellBrowser *iface, LPTBBUTTON lpButtons, UINT nButtons, UINT uFlags)
static const ICommDlgBrowserVtbl IShellBrowserImpl_ICommDlgBrowser_Vtbl
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDlgBrowser *iface, IShellView *ppshv)
static const IShellBrowserVtbl IShellBrowserImpl_Vtbl
static LRESULT send_includeitem_notification(HWND hwndParentDlg, LPCITEMIDLIST pidl)
static HRESULT WINAPI IShellBrowserImpl_GetControlWindow(IShellBrowser *iface, UINT id, HWND *lphwnd)
static ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser *iface)
static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_Release(ICommDlgBrowser *iface)
static HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface, REFIID riid, void **ppvObj)
static HRESULT WINAPI IShellBrowserImpl_SendControlMsg(IShellBrowser *iface, UINT id, UINT uMsg, WPARAM wParam, LPARAM lParam, LRESULT *pret)
static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryService(IServiceProvider *iface, REFGUID guidService, REFIID riid, void **ppv)
static ULONG WINAPI IShellBrowserImpl_IServiceProvider_AddRef(IServiceProvider *iface)
static HRESULT WINAPI IShellBrowserImpl_ContextSensitiveHelp(IShellBrowser *iface, BOOL fEnterMode)
static ULONG WINAPI IShellBrowserImpl_IServiceProvider_Release(IServiceProvider *iface)
static HRESULT WINAPI IShellBrowserImpl_EnableModelessSB(IShellBrowser *iface, BOOL fEnable)
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *iface, IShellView *ppshv, LPCITEMIDLIST pidl)
static BOOL COMDLG32_StrRetToStrNW(LPVOID dest, DWORD len, LPSTRRET src, LPCITEMIDLIST pidl)
static HRESULT WINAPI IShellBrowserImpl_RemoveMenusSB(IShellBrowser *iface, HMENU hmenuShared)
static HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface, LPCITEMIDLIST pidl, UINT wFlags)
static HRESULT WINAPI IShellBrowserImpl_InsertMenusSB(IShellBrowser *iface, HMENU hmenuShared, LPOLEMENUGROUPWIDTHS lpMenuWidths)
static ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef(ICommDlgBrowser *iface)
static void COMDLG32_UpdateCurrentDir(const FileOpenDlgInfos *fodInfos)
#define FE(x)
static HRESULT WINAPI IShellBrowserImpl_SetMenuSB(IShellBrowser *iface, HMENU hmenuShared, HOLEMENU holemenuReserved, HWND hwndActiveObject)
static HRESULT WINAPI IShellBrowserImpl_OnViewWindowActive(IShellBrowser *iface, IShellView *ppshv)
static IShellBrowserImpl * impl_from_ICommDlgBrowser(ICommDlgBrowser *iface)
static HRESULT WINAPI IShellBrowserImpl_GetViewStateStream(IShellBrowser *iface, DWORD grfMode, LPSTREAM *ppStrm)
static IShellBrowserImpl * impl_from_IShellBrowser(IShellBrowser *iface)
static ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser *iface)
static HRESULT WINAPI IShellBrowserImpl_SetStatusTextSB(IShellBrowser *iface, LPCOLESTR lpszStatusText)
static HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView(IShellBrowser *iface, IShellView **ppshv)
static const IServiceProviderVtbl IShellBrowserImpl_IServiceProvider_Vtbl
static HRESULT WINAPI IShellBrowserImpl_GetWindow(IShellBrowser *iface, HWND *phwnd)
static HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB(IShellBrowser *iface, LPMSG lpmsg, WORD wID)
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface(ICommDlgBrowser *iface, REFIID riid, LPVOID *ppvObj)
static IShellBrowserImpl * impl_from_IServiceProvider(IServiceProvider *iface)
static HRESULT IShellBrowserImpl_OnSelChange(IShellBrowserImpl *This, const IShellView *ppshv)
static HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBrowser *iface, IShellView *ppshv, ULONG uChange)
static HRESULT WINAPI IShellBrowserImpl_IServiceProvider_QueryInterface(IServiceProvider *iface, REFIID riid, LPVOID *ppvObj)
static void COMDLG32_DumpSBSPFlags(UINT uflags)
#define FODPROP_SAVEDLG
#define IDC_SHELLSTATIC
#define IDC_LOOKIN
unsigned short WORD
Definition: ntddk_ex.h:93
unsigned int BOOL
Definition: ntddk_ex.h:94
unsigned long DWORD
Definition: ntddk_ex.h:95
GLuint res
Definition: glext.h:9613
GLenum src
Definition: glext.h:6340
GLenum GLint GLuint mask
Definition: glext.h:6028
GLbitfield flags
Definition: glext.h:7161
GLenum GLsizei len
Definition: glext.h:6722
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
REFIID riid
Definition: atlbase.h:39
REFIID LPVOID * ppv
Definition: atlbase.h:39
#define S_OK
Definition: intsafe.h:52
#define SUCCEEDED(hr)
Definition: intsafe.h:50
#define FAILED(hr)
Definition: intsafe.h:51
#define debugstr_guid
Definition: kernel32.h:35
void WINAPI CoTaskMemFree(void *ptr)
Definition: malloc.c:389
LONG_PTR LPARAM
Definition: minwindef.h:175
LONG_PTR LRESULT
Definition: minwindef.h:176
UINT_PTR WPARAM
Definition: minwindef.h:174
static char * dest
Definition: rtl.c:135
static const CLSID *static CLSID *static const GUID VARIANT VARIANT *static IServiceProvider DWORD *static HMENU
Definition: ordinal.c:60
unsigned int UINT
Definition: ndis.h:50
interface IStream * LPSTREAM
Definition: objfwd.h:10
const GUID IID_IOleWindow
const GUID IID_IDataObject
long LONG
Definition: pedump.c:60
LPITEMIDLIST WINAPI ILClone(LPCITEMIDLIST pidl)
Definition: pidl.c:238
void WINAPI ILFree(LPITEMIDLIST pidl)
Definition: pidl.c:1051
LPITEMIDLIST WINAPI ILCombine(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:817
BOOL WINAPI ILIsEqual(LPCITEMIDLIST pidl1, LPCITEMIDLIST pidl2)
Definition: pidl.c:583
#define IsEqualIID(riid1, riid2)
Definition: guiddef.h:95
#define REFIID
Definition: guiddef.h:118
#define WM_NOTIFY
Definition: richedit.h:61
const WCHAR * str
#define CSIDL_DESKTOP
Definition: shlobj.h:2181
static IShellBrowser * IShellBrowserImpl_Construct(void)
Definition: shlview.c:278
ITEMIDLIST UNALIGNED * LPITEMIDLIST
Definition: shtypes.idl:41
@ STRRET_CSTR
Definition: shtypes.idl:87
@ STRRET_OFFSET
Definition: shtypes.idl:86
@ STRRET_WSTR
Definition: shtypes.idl:85
const ITEMIDLIST UNALIGNED * LPCITEMIDLIST
Definition: shtypes.idl:42
#define TRACE(s)
Definition: solgame.cpp:4
struct FileOpenDlgInfos::@337 DlgInfos
LPOPENFILENAMEW ofnInfos
struct FileOpenDlgInfos::@335 Shell
struct FileOpenDlgInfos::@336 ShellInfos
Implementation of IShellBrowser and ICommDlgBrowser interfaces for explorer child windows (see ShellB...
IServiceProvider IServiceProvider_iface
ICommDlgBrowser ICommDlgBrowser_iface
IShellBrowser IShellBrowser_iface
Definition: scsiwmi.h:51
LPVOID psf
Definition: commdlg.h:420
NMHDR hdr
Definition: commdlg.h:418
LPVOID pidl
Definition: commdlg.h:421
LPOPENFILENAMEA lpOFN
Definition: commdlg.h:419
LPVOID pidl
Definition: commdlg.h:429
LPVOID psf
Definition: commdlg.h:428
LPOPENFILENAMEW lpOFN
Definition: commdlg.h:427
NMHDR hdr
Definition: commdlg.h:426
Definition: fci.c:116
Definition: name.c:39
Definition: send.c:48
UINT_PTR idFrom
Definition: winuser.h:3260
UINT code
Definition: winuser.h:3261
HWND hwndFrom
Definition: winuser.h:3259
DWORD Flags
Definition: commdlg.h:373
#define CONTAINING_RECORD(address, type, field)
Definition: typedefs.h:260
uint32_t ULONG
Definition: typedefs.h:59
WINBASEAPI _In_ DWORD _Out_ _In_ WORD wFlags
Definition: wincon_undoc.h:337
#define WINAPI
Definition: msvc.h:6
#define S_FALSE
Definition: winerror.h:3451
#define E_NOINTERFACE
Definition: winerror.h:3479
#define NOERROR
Definition: winerror.h:3448
#define E_UNEXPECTED
Definition: winerror.h:3528
HWND WINAPI GetFocus(void)
Definition: window.c:1863
#define DM_SETDEFID
Definition: winuser.h:2135
BOOL WINAPI GetWindowRect(_In_ HWND, _Out_ LPRECT)
BOOL WINAPI SetWindowPos(_In_ HWND, _In_opt_ HWND, _In_ int, _In_ int, _In_ int, _In_ int, _In_ UINT)
#define SWP_NOMOVE
Definition: winuser.h:1255
#define WM_COMMAND
Definition: winuser.h:1768
LRESULT WINAPI SendMessageA(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI SetDlgItemTextW(_In_ HWND, _In_ int, _In_ LPCWSTR)
#define SWP_NOSIZE
Definition: winuser.h:1256
int WINAPI MapWindowPoints(_In_opt_ HWND hWndFrom, _In_opt_ HWND hWndTo, _Inout_updates_(cPoints) LPPOINT lpPoints, _In_ UINT cPoints)
#define WM_GETFONT
Definition: winuser.h:1679
HWND WINAPI GetDlgItem(_In_opt_ HWND, _In_ int)
#define IDOK
Definition: winuser.h:841
HWND WINAPI SetFocus(_In_opt_ HWND)
BOOL WINAPI IsChild(_In_ HWND, _In_ HWND)
#define WM_SETFONT
Definition: winuser.h:1678
HWND WINAPI GetParent(_In_ HWND)
#define GWLP_ID
Definition: winuser.h:871
#define SetWindowLongPtrW
Definition: winuser.h:5457
LRESULT WINAPI SendDlgItemMessageA(_In_ HWND, _In_ int, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
BOOL WINAPI PostMessageA(_In_opt_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
LRESULT WINAPI SendMessageW(_In_ HWND, _In_ UINT, _In_ WPARAM, _In_ LPARAM)
#define IDC_TOOLBAR
Definition: wordpad.h:157
const char * LPCSTR
Definition: xmlstorage.h:183
__wchar_t WCHAR
Definition: xmlstorage.h:180
WCHAR * LPWSTR
Definition: xmlstorage.h:184