|
|||||||
![]() |
|
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
How to set detail view when FileOpen dialog begins
In Microsoft Visual C++,when using the FileOpen common dialog: CFileDialog dlg(TRUE, ...) the default view is list. I would very much like to know how to override this behavior so that the file list populates as a details view. Since there is a button on the dialog that allows the user to select details view it would *seem* that this is easy, but I have been unable to discover a reasonable way to do it. |
|
#2
|
|||
|
|||
|
Re: How to set detail view when FileOpen dialog begins
Using Class Wizard add a class derived from CFileDialog, for example
CFileDetailsDialog. In CFileDetailsDialog override virtual void OnInitDone(): void CFileDetailsDialog::OnInitDone() { GetParent()->PostMessage(WM_COMMAND, MAKEWPARAM(0xA004, 0)); CFileDialog::OnInitDone(); } This works fine on Windows NT 4, but since the command 0xA004 is not defined in any header file, it is possible that the code will fail with other Windows versions. Boris Karadjov Brainbench MVP for Visual C++ http://www.brainbench.com "Tom Gettys" <tpgettys@teleport.com> wrote in message news:3b004668$1@news.devx.com... > > In Microsoft Visual C++,when using the FileOpen common dialog: > CFileDialog dlg(TRUE, ...) > the default view is list. > > I would very much like to know how to override this behavior so that the > file list populates as a details view. Since there is a button on the dialog > that allows the user to select details view it would *seem* that this is > easy, but I have been unable to discover a reasonable way to do it. |
![]() |
| Bookmarks |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|