RE: Derek - Win32Lib V0.58.6

new topic     » topic index » view thread      » older message » newer message

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

new topic     » topic index » view thread      » older message » newer message

Search



Quick Links

User menu

Not signed in.

Misc Menu