Hi everyone,

First, sorry if i'm not supposed to write anything about disassemblers though it's not really my question!

1) I'm writing a disassembler and using a ListView to display the disassemby, With some columns like: (Offset, Opcode, disassembly, comments,etc..).
My question is, what's the best way to insert items into the ListView?

Should i disassemble each line then add it to the ListView (Add the 4 columns items)?
Or should i do something like, saving all the disassembling in memory, then add all the data to the ListView?

I hope you understand my question cuz of my english.


2) What's the best way to add items to (4 columns) in a listview? I mean the obtimized code, cuz my code as i believe is long. Can anyone help me guyz?


Thanks in advance :alright:
Cya
CuTedEvil
Posted on 2003-07-18 00:45:13 by CuTedEvil
There is no optimized way to write to a listview, you must insert a new item and write each column. No way around it. The listview does not supply the capacity to add a group of items. The only thing I can suggest is that the code to add an item be made general and put in a proc so that it takes less space. Considering that it involves a minimum of 4 api calls there isn't alot of point to optimizing it anyway. The actual loading of the LV_ITEM structure is only an extremely small percentage (~<1%) of the execution time.
Posted on 2003-07-18 00:59:15 by donkey
Thanks donkey :cool:
Posted on 2003-07-18 20:11:56 by CuTedEvil