2 * Implementation of IShellBrowser for the File Open common dialog
9 #include "filedlgbrowser.h"
13 #include "wine/winestring.h"
16 #include "wine/obj_dataobject.h"
17 #include "debugtools.h"
20 DEFAULT_DEBUG_CHANNEL(commdlg);
22 /**************************************************************************
25 static ICOM_VTABLE(IShellBrowser) IShellBrowserImpl_Vtbl =
27 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
29 IShellBrowserImpl_QueryInterface,
30 IShellBrowserImpl_AddRef,
31 IShellBrowserImpl_Release,
33 IShellBrowserImpl_GetWindow,
34 IShellBrowserImpl_ContextSensitiveHelp,
36 IShellBrowserImpl_InsertMenusSB,
37 IShellBrowserImpl_SetMenuSB,
38 IShellBrowserImpl_RemoveMenusSB,
39 IShellBrowserImpl_SetStatusTextSB,
40 IShellBrowserImpl_EnableModelessSB,
41 IShellBrowserImpl_TranslateAcceleratorSB,
42 IShellBrowserImpl_BrowseObject,
43 IShellBrowserImpl_GetViewStateStream,
44 IShellBrowserImpl_GetControlWindow,
45 IShellBrowserImpl_SendControlMsg,
46 IShellBrowserImpl_QueryActiveShellView,
47 IShellBrowserImpl_OnViewWindowActive,
48 IShellBrowserImpl_SetToolbarItems
51 static ICOM_VTABLE(ICommDlgBrowser) IShellBrowserImpl_ICommDlgBrowser_Vtbl =
53 ICOM_MSVTABLE_COMPAT_DummyRTTIVALUE
55 IShellBrowserImpl_ICommDlgBrowser_QueryInterface,
56 IShellBrowserImpl_ICommDlgBrowser_AddRef,
57 IShellBrowserImpl_ICommDlgBrowser_Release,
59 IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand,
60 IShellBrowserImpl_ICommDlgBrowser_OnStateChange,
61 IShellBrowserImpl_ICommDlgBrowser_IncludeObject
65 /**************************************************************************
69 HRESULT IShellBrowserImpl_ICommDlgBrowser_OnSelChange(ICommDlgBrowser *iface, IShellView *ppshv);
71 LPITEMIDLIST GetSelectedPidl(IShellView *ppshv);
74 /**************************************************************************
77 extern const char *FileOpenDlgInfosStr;
79 extern HRESULT GetName(LPSHELLFOLDER lpsf, LPITEMIDLIST pidl,DWORD dwFlags,LPSTR lpstrFileName);
80 extern HRESULT GetFileName(HWND hwnd, LPITEMIDLIST pidl, LPSTR lpstrFileName);
81 extern IShellFolder* GetShellFolderFromPidl(LPITEMIDLIST pidlAbs);
82 extern LPITEMIDLIST GetParentPidl(LPITEMIDLIST pidl);
83 extern LPITEMIDLIST GetPidlFromName(IShellFolder *psf,LPCSTR lpcstrFileName);
85 extern BOOL FILEDLG95_SHELL_FillIncludedItemList(HWND hwnd,
86 LPITEMIDLIST pidlCurrentFolder,
89 extern int FILEDLG95_LOOKIN_SelectItem(HWND hwnd,LPITEMIDLIST pidl);
90 extern BOOL FILEDLG95_OnOpen(HWND hwnd);
91 extern HRESULT SendCustomDlgNotificationMessage(HWND hwndParentDlg, UINT uCode);
94 /**************************************************************************
95 * IShellBrowserImpl_Construct
97 IShellBrowser * IShellBrowserImpl_Construct(HWND hwndOwner)
99 IShellBrowserImpl *sb;
100 FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(hwndOwner,FileOpenDlgInfosStr);
102 sb=(IShellBrowserImpl*)COMDLG32_SHAlloc(sizeof(IShellBrowserImpl));
104 /* Initialisation of the member variables */
106 sb->hwndOwner = hwndOwner;
108 /* Initialisation of the vTables */
109 sb->lpVtbl = &IShellBrowserImpl_Vtbl;
110 sb->lpVtbl2 = &IShellBrowserImpl_ICommDlgBrowser_Vtbl;
112 COMDLG32_SHGetSpecialFolderLocation(hwndOwner, CSIDL_DESKTOP,
113 &fodInfos->ShellInfos.pidlAbsCurrent);
117 return (IShellBrowser *) sb;
120 /**************************************************************************
123 * The INTERFACE of the IShellBrowser object
131 /***************************************************************************
132 * IShellBrowserImpl_QueryInterface
134 HRESULT WINAPI IShellBrowserImpl_QueryInterface(IShellBrowser *iface,
138 ICOM_THIS(IShellBrowserImpl, iface);
140 TRACE("(%p)\n", This);
144 if(IsEqualIID(riid, &IID_IUnknown)) /*IUnknown*/
147 else if(IsEqualIID(riid, &IID_IOleWindow)) /*IOleWindow*/
148 { *ppvObj = (IOleWindow*)This;
151 else if(IsEqualIID(riid, &IID_IShellBrowser)) /*IShellBrowser*/
152 { *ppvObj = (IShellBrowser*)This;
155 else if(IsEqualIID(riid, &IID_ICommDlgBrowser)) /*ICommDlgBrowser*/
156 { *ppvObj = (ICommDlgBrowser*) &(This->lpVtbl2);
160 { IUnknown_AddRef( (IShellBrowser*) *ppvObj);
163 return E_NOINTERFACE;
166 /**************************************************************************
167 * IShellBrowser::AddRef
169 ULONG WINAPI IShellBrowserImpl_AddRef(IShellBrowser * iface)
171 ICOM_THIS(IShellBrowserImpl, iface);
173 TRACE("(%p)\n", This);
175 return ++(This->ref);
178 /**************************************************************************
179 * IShellBrowserImpl_Release
181 ULONG WINAPI IShellBrowserImpl_Release(IShellBrowser * iface)
183 ICOM_THIS(IShellBrowserImpl, iface);
185 TRACE("(%p)\n", This);
189 HeapFree(GetProcessHeap(),0, This);
199 /**************************************************************************
200 * IShellBrowserImpl_GetWindow (IOleWindow)
202 * Inherited from IOleWindow::GetWindow
204 * See Windows documentation for more details
206 * Note : We will never be window less in the File Open dialog
209 HRESULT WINAPI IShellBrowserImpl_GetWindow(IShellBrowser * iface,
212 ICOM_THIS(IShellBrowserImpl, iface);
214 TRACE("(%p)\n", This);
219 *phwnd = This->hwndOwner;
221 return (*phwnd) ? S_OK : E_UNEXPECTED;
225 /**************************************************************************
226 * IShellBrowserImpl_ContextSensitiveHelp
228 HRESULT WINAPI IShellBrowserImpl_ContextSensitiveHelp(IShellBrowser * iface,
231 ICOM_THIS(IShellBrowserImpl, iface);
233 TRACE("(%p)\n", This);
235 /* Feature not implemented */
243 /**************************************************************************
244 * IShellBrowserImpl_BrowseObject
246 * See Windows documentation on IShellBrowser::BrowseObject for more details
248 * This function will override user specified flags and will always
249 * use SBSP_DEFBROWSER and SBSP_DEFMODE.
251 HRESULT WINAPI IShellBrowserImpl_BrowseObject(IShellBrowser *iface,
256 IShellFolder *psfTmp;
258 FileOpenDlgInfos *fodInfos;
259 LPITEMIDLIST pidlTmp;
264 ICOM_THIS(IShellBrowserImpl, iface);
266 TRACE("(%p)(%p,0x%08x)\n", This, pidl, wFlags);
268 fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
270 /* Format the pidl according to its parameter's category */
271 if(wFlags & SBSP_RELATIVE)
274 /* SBSP_RELATIVE A relative pidl (relative from the current folder) */
275 if(FAILED(hRes = IShellFolder_BindToObject(fodInfos->Shell.FOIShellFolder,
276 pidl, NULL, &IID_IShellFolder, (LPVOID *)&psfTmp)))
278 ERR("bind to object failed\n");
281 /* create an absolute pidl */
282 pidlTmp = COMDLG32_PIDL_ILCombine(fodInfos->ShellInfos.pidlAbsCurrent,
285 else if(wFlags & SBSP_PARENT)
287 /* Browse the parent folder (ignores the pidl) */
288 pidlTmp = GetParentPidl(fodInfos->ShellInfos.pidlAbsCurrent);
289 psfTmp = GetShellFolderFromPidl(pidlTmp);
292 else /* SBSP_ABSOLUTE is 0x0000 */
294 /* An absolute pidl (relative from the desktop) */
295 pidlTmp = COMDLG32_PIDL_ILClone((LPITEMIDLIST)pidl);
296 psfTmp = GetShellFolderFromPidl(pidlTmp);
299 if(!psfTmp) return E_FAIL;
301 /* If the pidl to browse to is equal to the actual pidl ...
302 do nothing and pretend you did it*/
303 if(COMDLG32_PIDL_ILIsEqual(pidlTmp,fodInfos->ShellInfos.pidlAbsCurrent))
305 IShellFolder_Release(psfTmp);
306 COMDLG32_SHFree(pidlTmp);
310 /* Release the current DataObject */
311 if (fodInfos->Shell.FOIDataObject)
313 IDataObject_Release(fodInfos->Shell.FOIDataObject);
314 fodInfos->Shell.FOIDataObject = NULL;
317 /* Create the associated view */
318 if(FAILED(hRes = IShellFolder_CreateViewObject(psfTmp, fodInfos->ShellInfos.hwndOwner,
319 &IID_IShellView, (LPVOID *)&psvTmp))) return hRes;
321 /* Check if listview has focus */
322 bViewHasFocus = IsChild(fodInfos->ShellInfos.hwndView,GetFocus());
324 /* Get the foldersettings from the old view */
325 if(fodInfos->Shell.FOIShellView)
326 IShellView_GetCurrentInfo(fodInfos->Shell.FOIShellView, &fodInfos->ShellInfos.folderSettings);
328 /* Release the old fodInfos->Shell.FOIShellView and update its value.
329 We have to update this early since ShellView_CreateViewWindow of native
330 shell32 calls OnStateChange and needs the correct view here.*/
331 if(fodInfos->Shell.FOIShellView)
333 IShellView_DestroyViewWindow(fodInfos->Shell.FOIShellView);
334 IShellView_Release(fodInfos->Shell.FOIShellView);
336 fodInfos->Shell.FOIShellView = psvTmp;
338 /* Release old FOIShellFolder and update its value */
339 if (fodInfos->Shell.FOIShellFolder)
340 IShellFolder_Release(fodInfos->Shell.FOIShellFolder);
341 fodInfos->Shell.FOIShellFolder = psfTmp;
343 /* Release old pidlAbsCurrent and update its value */
344 COMDLG32_SHFree((LPVOID)fodInfos->ShellInfos.pidlAbsCurrent);
345 fodInfos->ShellInfos.pidlAbsCurrent = pidlTmp;
347 /* Create the window */
348 TRACE("create view window\n");
349 if(FAILED(hRes = IShellView_CreateViewWindow(psvTmp, NULL,
350 &fodInfos->ShellInfos.folderSettings, fodInfos->Shell.FOIShellBrowser,
351 &fodInfos->ShellInfos.rectView, &hwndView))) return hRes;
353 fodInfos->ShellInfos.hwndView = hwndView;
355 /* Select the new folder in the Look In combo box of the Open file dialog */
356 FILEDLG95_LOOKIN_SelectItem(fodInfos->DlgInfos.hwndLookInCB,fodInfos->ShellInfos.pidlAbsCurrent);
358 /* changes the tab order of the ListView to reflect the window's File Dialog */
359 hDlgWnd = GetDlgItem(GetParent(hwndView), IDC_LOOKIN);
360 SetWindowPos(hwndView, hDlgWnd, 0,0,0,0, SWP_NOMOVE | SWP_NOSIZE);
362 /* Since we destroyed the old view if it had focus set focus to the newly created view */
364 SetFocus(fodInfos->ShellInfos.hwndView);
369 /**************************************************************************
370 * IShellBrowserImpl_EnableModelessSB
372 HRESULT WINAPI IShellBrowserImpl_EnableModelessSB(IShellBrowser *iface,
376 ICOM_THIS(IShellBrowserImpl, iface);
378 TRACE("(%p)\n", This);
380 /* Feature not implemented */
384 /**************************************************************************
385 * IShellBrowserImpl_GetControlWindow
387 HRESULT WINAPI IShellBrowserImpl_GetControlWindow(IShellBrowser *iface,
392 ICOM_THIS(IShellBrowserImpl, iface);
394 TRACE("(%p)\n", This);
396 /* Feature not implemented */
399 /**************************************************************************
400 * IShellBrowserImpl_GetViewStateStream
402 HRESULT WINAPI IShellBrowserImpl_GetViewStateStream(IShellBrowser *iface,
407 ICOM_THIS(IShellBrowserImpl, iface);
409 TRACE("(%p)\n", This);
411 /* Feature not implemented */
414 /**************************************************************************
415 * IShellBrowserImpl_InsertMenusSB
417 HRESULT WINAPI IShellBrowserImpl_InsertMenusSB(IShellBrowser *iface,
419 LPOLEMENUGROUPWIDTHS lpMenuWidths)
422 ICOM_THIS(IShellBrowserImpl, iface);
424 TRACE("(%p)\n", This);
426 /* Feature not implemented */
429 /**************************************************************************
430 * IShellBrowserImpl_OnViewWindowActive
432 HRESULT WINAPI IShellBrowserImpl_OnViewWindowActive(IShellBrowser *iface,
436 ICOM_THIS(IShellBrowserImpl, iface);
438 TRACE("(%p)\n", This);
440 /* Feature not implemented */
443 /**************************************************************************
444 * IShellBrowserImpl_QueryActiveShellView
446 HRESULT WINAPI IShellBrowserImpl_QueryActiveShellView(IShellBrowser *iface,
450 ICOM_THIS(IShellBrowserImpl, iface);
452 FileOpenDlgInfos *fodInfos;
454 TRACE("(%p)\n", This);
456 fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
458 if(!(*ppshv = fodInfos->Shell.FOIShellView))
462 IShellView_AddRef(fodInfos->Shell.FOIShellView);
465 /**************************************************************************
466 * IShellBrowserImpl_RemoveMenusSB
468 HRESULT WINAPI IShellBrowserImpl_RemoveMenusSB(IShellBrowser *iface,
472 ICOM_THIS(IShellBrowserImpl, iface);
474 TRACE("(%p)\n", This);
476 /* Feature not implemented */
479 /**************************************************************************
480 * IShellBrowserImpl_SendControlMsg
482 HRESULT WINAPI IShellBrowserImpl_SendControlMsg(IShellBrowser *iface,
490 ICOM_THIS(IShellBrowserImpl, iface);
493 TRACE("(%p)->(0x%08x 0x%08x 0x%08x 0x%08lx %p)\n", This, id, uMsg, wParam, lParam, pret);
498 lres = SendDlgItemMessageA( This->hwndOwner, IDC_TOOLBAR, uMsg, wParam, lParam);
501 FIXME("ctrl id: %x\n", id);
504 if (pret) *pret = lres;
507 /**************************************************************************
508 * IShellBrowserImpl_SetMenuSB
510 HRESULT WINAPI IShellBrowserImpl_SetMenuSB(IShellBrowser *iface,
512 HOLEMENU holemenuReserved,
513 HWND hwndActiveObject)
516 ICOM_THIS(IShellBrowserImpl, iface);
518 TRACE("(%p)\n", This);
520 /* Feature not implemented */
523 /**************************************************************************
524 * IShellBrowserImpl_SetStatusTextSB
526 HRESULT WINAPI IShellBrowserImpl_SetStatusTextSB(IShellBrowser *iface,
527 LPCOLESTR lpszStatusText)
530 ICOM_THIS(IShellBrowserImpl, iface);
532 TRACE("(%p)\n", This);
534 /* Feature not implemented */
537 /**************************************************************************
538 * IShellBrowserImpl_SetToolbarItems
540 HRESULT WINAPI IShellBrowserImpl_SetToolbarItems(IShellBrowser *iface,
541 LPTBBUTTON lpButtons,
546 ICOM_THIS(IShellBrowserImpl, iface);
548 TRACE("(%p)\n", This);
550 /* Feature not implemented */
553 /**************************************************************************
554 * IShellBrowserImpl_TranslateAcceleratorSB
556 HRESULT WINAPI IShellBrowserImpl_TranslateAcceleratorSB(IShellBrowser *iface,
561 ICOM_THIS(IShellBrowserImpl, iface);
563 TRACE("(%p)\n", This);
565 /* Feature not implemented */
573 /***************************************************************************
574 * IShellBrowserImpl_ICommDlgBrowser_QueryInterface
576 HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_QueryInterface(ICommDlgBrowser *iface,
580 _ICOM_THIS_FromICommDlgBrowser(IShellBrowser,iface);
582 TRACE("(%p)\n", This);
584 return IShellBrowserImpl_QueryInterface(This,riid,ppvObj);
587 /**************************************************************************
588 * IShellBrowserImpl_ICommDlgBrowser_AddRef
590 ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_AddRef(ICommDlgBrowser * iface)
592 _ICOM_THIS_FromICommDlgBrowser(IShellBrowser,iface);
594 TRACE("(%p)\n", This);
596 return IShellBrowserImpl_AddRef(This);
599 /**************************************************************************
600 * IShellBrowserImpl_ICommDlgBrowser_Release
602 ULONG WINAPI IShellBrowserImpl_ICommDlgBrowser_Release(ICommDlgBrowser * iface)
604 _ICOM_THIS_FromICommDlgBrowser(IShellBrowser,iface);
606 TRACE("(%p)\n", This);
608 return IShellBrowserImpl_Release(This);
610 /**************************************************************************
611 * IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand
613 * Called when a user double-clicks in the view or presses the ENTER key
615 HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnDefaultCommand(ICommDlgBrowser *iface,
619 FileOpenDlgInfos *fodInfos;
621 _ICOM_THIS_FromICommDlgBrowser(IShellBrowserImpl,iface);
623 TRACE("(%p)\n", This);
625 fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
627 /* If the selected object is not a folder, send a IDOK command to parent window */
628 if((pidl = GetPidlFromDataObject(fodInfos->Shell.FOIDataObject, 1)))
632 ULONG ulAttr = SFGAO_FOLDER | SFGAO_HASSUBFOLDER;
633 IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, &pidl, &ulAttr);
634 if (ulAttr & (SFGAO_FOLDER | SFGAO_HASSUBFOLDER) )
636 hRes = IShellBrowser_BrowseObject((IShellBrowser *)This,pidl,SBSP_RELATIVE);
640 /* Tell the dialog that the user selected a file */
641 hRes = PostMessageA(This->hwndOwner, WM_COMMAND, IDOK, 0L);
644 /* Free memory used by pidl */
645 COMDLG32_SHFree((LPVOID)pidl);
653 /**************************************************************************
654 * IShellBrowserImpl_ICommDlgBrowser_OnStateChange
656 HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_OnStateChange(ICommDlgBrowser *iface,
661 _ICOM_THIS_FromICommDlgBrowser(IShellBrowserImpl,iface);
663 TRACE("(%p shv=%p)\n", This, ppshv);
667 case CDBOSC_SETFOCUS:
668 /* FIXME: Reset the default button.
669 This should be taken care of by defdlg. If control
670 other than button receives focus the default button
671 should be restored. */
672 SendMessageA(This->hwndOwner, DM_SETDEFID, IDOK, 0);
675 case CDBOSC_KILLFOCUS:
677 FileOpenDlgInfos *fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
678 if(fodInfos->DlgInfos.dwDlgProp & FODPROP_SAVEDLG)
679 SetDlgItemTextA(fodInfos->ShellInfos.hwndOwner,IDOK,"&Save");
682 case CDBOSC_SELCHANGE:
683 return IShellBrowserImpl_ICommDlgBrowser_OnSelChange(iface,ppshv);
692 /* copied from shell32 to avoid linking to it */
693 static HRESULT COMDLG32_StrRetToStrNW (LPVOID dest, DWORD len, LPSTRRET src, LPITEMIDLIST pidl)
695 TRACE("dest=0x%p len=0x%lx strret=0x%p pidl=%p stub\n",dest,len,src,pidl);
700 lstrcpynW((LPWSTR)dest, src->u.pOleStr, len);
701 COMDLG32_SHFree(src->u.pOleStr);
705 lstrcpynAtoW((LPWSTR)dest, src->u.cStr, len);
711 lstrcpynAtoW((LPWSTR)dest, ((LPCSTR)&pidl->mkid)+src->u.uOffset, len);
716 FIXME("unknown type!\n");
718 { *(LPSTR)dest = '\0';
724 /**************************************************************************
725 * IShellBrowserImpl_ICommDlgBrowser_IncludeObject
727 HRESULT WINAPI IShellBrowserImpl_ICommDlgBrowser_IncludeObject(ICommDlgBrowser *iface,
731 FileOpenDlgInfos *fodInfos;
734 WCHAR szPathW[MAX_PATH];
736 _ICOM_THIS_FromICommDlgBrowser(IShellBrowserImpl,iface);
738 TRACE("(%p)\n", This);
740 fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
742 ulAttr = SFGAO_HIDDEN | SFGAO_FOLDER | SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR | SFGAO_LINK;
743 IShellFolder_GetAttributesOf(fodInfos->Shell.FOIShellFolder, 1, &pidl, &ulAttr);
745 if( (ulAttr & SFGAO_HIDDEN) /* hidden */
746 | !(ulAttr & (SFGAO_FILESYSTEM | SFGAO_FILESYSANCESTOR))) /* special folder */
749 /* always include directorys and links */
750 if(ulAttr & (SFGAO_FOLDER | SFGAO_LINK))
753 /* Check if there is a mask to apply if not */
754 if(!fodInfos->ShellInfos.lpstrCurrentFilter || !lstrlenW(fodInfos->ShellInfos.lpstrCurrentFilter))
757 if (SUCCEEDED(IShellFolder_GetDisplayNameOf(fodInfos->Shell.FOIShellFolder, pidl, SHGDN_INFOLDER | SHGDN_FORPARSING, &str)))
759 if (SUCCEEDED(COMDLG32_StrRetToStrNW(szPathW, MAX_PATH, &str, pidl)))
761 if (COMDLG32_PathMatchSpecW(szPathW, fodInfos->ShellInfos.lpstrCurrentFilter))
769 /**************************************************************************
770 * IShellBrowserImpl_ICommDlgBrowser_OnSelChange
772 HRESULT IShellBrowserImpl_ICommDlgBrowser_OnSelChange(ICommDlgBrowser *iface, IShellView *ppshv)
774 FileOpenDlgInfos *fodInfos;
776 _ICOM_THIS_FromICommDlgBrowser(IShellBrowserImpl,iface);
778 fodInfos = (FileOpenDlgInfos *) GetPropA(This->hwndOwner,FileOpenDlgInfosStr);
779 TRACE("(%p do=%p view=%p)\n", This, fodInfos->Shell.FOIDataObject, fodInfos->Shell.FOIShellView);
781 /* release old selections */
782 if (fodInfos->Shell.FOIDataObject)
783 IDataObject_Release(fodInfos->Shell.FOIDataObject);
785 /* get a new DataObject from the ShellView */
786 if(FAILED(IShellView_GetItemObject(fodInfos->Shell.FOIShellView, SVGIO_SELECTION,
787 &IID_IDataObject, (LPVOID*)&fodInfos->Shell.FOIDataObject)))
790 FILEDLG95_FILENAME_FillFromSelection(This->hwndOwner);
792 SendCustomDlgNotificationMessage(This->hwndOwner, CDN_SELCHANGE);