The MASM Forum

General => The Campus => Topic started by: jj2007 on August 25, 2012, 07:18:24 AM

Title: Advanced listview example with column sort and OpenFile dialog
Post by: jj2007 on August 25, 2012, 07:18:24 AM
The attached example
- loads all filenames matching \Masm32\Examples\*.inc|*.asm into an array
- displays them in a listview control, sorted by newest first
- allows sorting by name, size, date & time
- allows to pick another folder using GetOpenFileName
- allows to select and open a file from the listview

It is also a demo for conditional assembly (see "MyChoice" in line 10) and uses throughout "short globals" relative to the ebx register.

The *.asc source is for use with RichMasm, the *.asm file is better suited for qEditor.
Title: Re: Advanced listview example with column sort and OpenFile dialog
Post by: UoSunsetter on August 27, 2012, 12:09:30 PM
Thanks for the example. I am taking my time to learn from it. It is "really" well commented. Even for a newbie like me :) Also, in higher level languages, I was suffering from the slowness of listboxes with colums while scrolling, which I think is related to extra drawings. But yours is quite fast.
Title: Re: Advanced listview example with column sort and OpenFile dialog
Post by: dedndave on August 27, 2012, 11:40:54 PM
very nice, Jochen   :t

i noticed the date column sorts in only one direction
that must be by design ?
Title: Re: Advanced listview example with column sort and OpenFile dialog
Post by: hfheatherfox07 on August 28, 2012, 03:29:36 AM
Nice.... This maybe should be included in masm32 as index for examples  :t


@@jj2007 when I follow you signature link "Masm32 Tips, Tricks and Traps" http://www.webalice.it/jj2006/Masm32_Tips_Tricks_and_Traps.htm

Step 6 http://www.masm32.com/board/index.php?topic=12460 Gives me an error :

The topic or board you are looking for appears to be either missing or off limits to you


You may still have the old forum link
Title: Re: Advanced listview example with column sort and OpenFile dialog
Post by: jj2007 on September 02, 2012, 06:11:52 AM
It is "really" well commented.
I hope there is no irony in this :lol:

i noticed the date column sorts in only one direction
GetFiles + SortFiles yields a pre-sorted column, so the first click does nothing, but the second one will work: not lvSortAsc[eax] toggles all column sorts.

Step 6 http://www.masm32.com/board/index.php?topic=12460 Gives me an error...You may still have the old forum link

Yes indeed, thanks for reminding me. Oddly enough, my disk version was already corrected, it seems I just forgot to upload it.

Thanks to everybody for the nice feedback :t
Title: Re: Advanced listview example with column sort and OpenFile dialog
Post by: hutch-- on September 02, 2012, 11:56:53 AM
 :t