Re: OpenFileName - Details as default

new topic     » goto parent     » topic index » view thread      » older message » newer message

Mike777 wrote:
> 
> Using win32lib via Enhanced IDE as my development platform, is there a way to
> ask that the open file name dialog box be opened with the Details view as the
> default, and with the resulting view sorted on either file name or in date
> order
> (by user choice)?  I would have thought that one of the OFN flags would
> specify
> the view or the sort order, but I haven't found anything that indicates it to
> be so.
> 
> <a
> href="http://msdn2.microsoft.com/en-us/library/ms646839">http://msdn2.microsoft.com/en-us/library/ms646839</a>(VS.85).aspx
> 
> is pretty detailed.  It seems that the right way to do this is to specify a
> hook procedure with the flag OFN_ENABLEHOOK. win32Lib's getopenfilename
> procedure
> allows me to set the flag. However, once that is done, I am a bit lost.  It
> looks like the lpfnHook needs to be set with a pointer to a hook procedure and
> then, at some point, change the view (probably with an appropriately placed
> 
> 
> ListView_SetView(hListView,LV_VIEW_DETAILS)
> 
> It doesn't appear that the lpfnHook item is exposed to me. But I'm just
> guessing
> at 1/2 of this.
> 
> Thanks
> 
> Mike

I found a link to an article in MSDN Magazine that shows how this can be done.
There is some code in C++/MFC. I don't understand the code very well but there
are others on the forum that do.

http://msdn.microsoft.com/msdnmag/issues/04/03/CQA/

Larry Miller

new topic     » goto parent     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu