1. RE: Derek - Win32Lib V0.58.6
- Posted by Jonas Temple <jtemple at yhti.net> May 15, 2003
- 410 views
Derek, So we're talking about the same thing, I downloaded V0.58.8. Great work, by the way. I did check the docs for insertLVColumn but it still had iSubItem as the last parm. Here's the routine from Win32Lib.ew: --/topic ListView Control --/proc insertLVColumn(id,index,mask,fmt,cx,text,iSubItem ) --/desc Inserts a new column into a listview control. global procedure insertLVColumn( atom id, integer index, atom mask, atom fmt, atom cx, object text, object pColumn ) atom LV_COLUMN LV_COLUMN = struct_LVCOLUMN( LVCF_SUBITEM, fmt, cx, text, pColumn ) VOID = sendMessage( id, LVM_INSERTCOLUMN, pColumn - 1, LV_COLUMN) release_mem( LV_COLUMN ) end procedure The question I have is you're subtracting 1 from pColumn, which is an object. You're saying I can pass a sequence to this routine to have an image for the column header? Won't this bomb the program? I thought the routine should be: --/topic ListView Control --/proc insertLVColumn(id,index,mask,fmt,cx,text,iSubItem ) --/desc Inserts a new column into a listview control. global procedure insertLVColumn( atom id, integer index, atom mask, atom fmt, atom cx, object text, object pColumn ) atom LV_COLUMN LV_COLUMN = struct_LVCOLUMN( LVCF_SUBITEM, fmt, cx, text, pColumn ) VOID = sendMessage( id, LVM_INSERTCOLUMN, index - 1, LV_COLUMN) release_mem( LV_COLUMN ) end procedure Note the only change is "index - 1" instead of "pColumn - 1". Am I missing something? Thanks, Jonas
2. RE: Derek - Win32Lib V0.58.6
- Posted by Jonas Temple <jtemple at yhti.net> May 15, 2003
- 414 views
Derek Parnell wrote: > > I thought the routine should be: > > > > --/topic ListView Control > > --/proc insertLVColumn(id,index,mask,fmt,cx,text,iSubItem ) > > --/desc Inserts a new column into a listview control. > > global procedure insertLVColumn( atom id, integer index, > > atom mask, atom fmt, atom cx, object text, object > > pColumn ) > > > > atom LV_COLUMN > > > > LV_COLUMN = struct_LVCOLUMN( LVCF_SUBITEM, fmt, cx, text, pColumn ) > > > > VOID = sendMessage( id, LVM_INSERTCOLUMN, index - 1, LV_COLUMN) > > > > release_mem( LV_COLUMN ) > > > > end procedure > > > > Note the only change is "index - 1" instead of "pColumn - 1". > > > > Am I missing something? > > Not really. The 'index' parameter is not used anymore. In reality I > should > delete it but that might break some existing code. In reality if anyone was using insertLVColumn in it's prior version their code is broken anyway. > > > What do people think? Can I remove this parameter? I think since you're changing the routine and it will require us to review our code, go ahead and nuke it. Jonas >