Top DevX Stories
Creating Custom Export Filters for StarOffice with XSLT
WPF Wonders: Using DataTemplates
Crystal Reports Family Offers Options for Developers
Avaya Aura Session Manager video
Avaya Aura Overview video
Search the forums:

Go Back   DevX.com Forums > DevX Developer Forums > C++

Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 05-14-2001, 05:56 PM
Tom Gettys
Guest
 
Posts: n/a
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.
Reply With Quote
  #2  
Old 05-15-2001, 04:47 PM
Boris Karadjov
Guest
 
Posts: n/a
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.



Reply With Quote
Reply

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are Off
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT -4. The time now is 01:30 AM.


Sponsored Links



Acceptable Use Policy

internet.comMediabistrojusttechjobs.comGraphics.com

WebMediaBrands Corporate Info


Advertise | Newsletters | Feedback | Submit News

Legal Notices | Licensing | Permissions | Privacy Policy


Powered by vBulletin® Version 3.7.3
Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.