XPMs to ListView icons

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

I'm using Euphoria 3.1.1 in Win XP SP3. I'm writing a program to use a ListView, and I want to add icons from included 32x32 XPM data. It looked easy enough, but the nearest thing I get to working is icons of about 12x12 size, apparently coming from one of my 32x32 icons but with an offset, and with the transparent colour being black instead of BTNFACE as declared in setTransparentColor(). What I have is:

global atom hFolder 
setTransparentColor( getSysColor( COLOR_BTNFACE ) ) 
constant Folder_xpm = xpmToEuBmp( 
{ 
"32 32 4 1", 
"o c None", 
"$ c #4B1900", 
", c #000000", 
"8 c #AF6400", 
"oooooooooooooooooooooooooooooooo", 
"oooooooooooooooooooooooooooooooo", 
"....  several other lines       ", 
"oooooo$$$$$$$$$$$$$$$$$$$$$$$ooo", 
"oooooooooooooooooooooooooooooooo"} 
) 
 
hFolder = createDIB( {Folder_xpm[1],Folder_xpm[2]} )	-- Handle to Win32 bitmap 
global 
constant iFolder = addDIB(hFolder) 
 

I'm then using iFolder in a call to addLVitem() ... with the results I have said.

VOID=addLVItem({iDir,-1}, iFolder, {"",line}) 
 

Can someone tell what I SHOULD do to go from an included XPM with transparent color to a ListView icon, please?

Andy

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

Search



Quick Links

User menu

Not signed in.

Misc Menu