Author Topic: Advanced listview example with column sort and OpenFile dialog  (Read 4758 times)

jj2007

  • Member
  • *****
  • Posts: 9378
  • Assembler is fun ;-)
    • MasmBasic
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

  • Guest
Re: Advanced listview example with column sort and OpenFile dialog
« Reply #1 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.

dedndave

  • Member
  • *****
  • Posts: 8823
  • Still using Abacus 2.0
    • DednDave
Re: Advanced listview example with column sort and OpenFile dialog
« Reply #2 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 ?

hfheatherfox07

  • Member
  • ***
  • Posts: 464
Re: Advanced listview example with column sort and OpenFile dialog
« Reply #3 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
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

  • Member
  • *****
  • Posts: 9378
  • Assembler is fun ;-)
    • MasmBasic
Re: Advanced listview example with column sort and OpenFile dialog
« Reply #4 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

hutch--

  • Administrator
  • Member
  • ******
  • Posts: 6254
  • Mnemonic Driven API Grinder
    • The MASM32 SDK
Re: Advanced listview example with column sort and OpenFile dialog
« Reply #5 on: September 02, 2012, 11:56:53 AM »
 :t
hutch at movsd dot com
http://www.masm32.com    :biggrin:  :biggrin: