Hey Guys,
here is an other question about the CCOmmonDlg.
I have a CCommonDlg and use it as FileOpen or FileSave Dialog.
In DoModal i pass a OPENFILENAME-Structure to the ::GetOpenFileName()/::GetSaveFileName() Function.
Now i have an hook , so i'm able to play a little bit with the controlls inside the window.
I want to select the file wich is passed by the OPENFILENAME Structure as the initial file name.
My idea was to get the Controll-Handley by FindWindowEx like this:
HWND hwndParentDlg = ::GetParent( this->m_hWnd );
HWND hwndShellDllDefView = ::FindWindowEx( hwndParentDlg, NULL, "SHELLDLL_DefView", NULL );
HWND hwndSysListView = ::FindWindowEx( hwndShellDllDefView, NULL, "SysListView32", NULL );
And then calling
ListView_SetSelectionMark( hwndSysListView, nIdx );
to select the Item at nIdx-Pos.
actually i do this in the CDN_FOLDERCHANGE Message inside WM_NOTIFY.
But it seems like the SysListView32 is not present here.
Where i could place my code?
Thanks a lot for your answers!
Best regards,
c3d1