News:

Masm32 SDK description, downloads and other helpful links
Message to All Guests
NB: Posting URL's See here: Posted URL Change

Main Menu

Advanced listview example with column sort and OpenFile dialog

Started by jj2007, August 25, 2012, 07:18:24 AM

Previous topic - Next topic

jj2007

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.

UoSunsetter

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.

dedndave

very nice, Jochen   :t

i noticed the date column sorts in only one direction
that must be by design ?

hfheatherfox07

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
Your code and your skills will be assimilated. Your programming language is irrelevant.
We are the ASM Borg and you will become part of us. Compile and be assembled.

jj2007

Quote from: UoSunsetter on August 27, 2012, 12:09:30 PMIt is "really" well commented.
I hope there is no irony in this :lol:

Quote from: dedndave on August 27, 2012, 11:40:54 PM
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.

Quote from: hfheatherfox07 on August 28, 2012, 03:29:36 AM
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

hutch--