Hi,
It's simple: just send a WM_COMMAND message to the Filelist view with wParam
= &H7029. Here is the other constants you can use for the other views:
'// filelist constants (SHELLDLL_DefView)
Public Const IDM_SHVIEW_LARGEICON = &H7029 ' 28713
Public Const IDM_SHVIEW_SMALLICON = &H702A ' 28714
Public Const IDM_SHVIEW_LIST = &H702B ' 28715
Public Const IDM_SHVIEW_REPORT = &H702C ' 28716
However, you still have two problems:
1. You must find the File list view's hwnd (it's a SHELLDLL_DefView window),
which is not exposed by vb common dialog
2. You must set it at initialization time, which again is not exposed by the
vb common dialog.
To overcome these two limitations you should call the common dialog by API
and set up a hook procedure looking for a WM_NOTIFY message with
lParam=CDN_INITIALIZE, and there send the message.
Or you could resort to a third party component exposing the relevant handles
(tipically, the dialog's handle, from which you can FindWindow for a
SHELLDLL_DefView window to which send the message). CCRP FileDialogs version
4 (now in internal beta) will have a View property allowing the user to
choose the preferred view.
Regards,
Domenico
Quote:
> Hi
> I am trying to display Large Icon's in the common dialog control.
> Is there any way that I can set up the common dialog to display large
icons
> as default.
> I am using VB5 pro.
> Thanks Alan