win32lib image list routines

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

Am I using them wrong or is there a problem with them?

Here is a demo which gives an error when you uncomment either of the 2 
marked lines.

--begin code

include win32lib.ew
without warning

constant win = create( Window, "win", 0, 100, 100, 100, 100, 0 )

sequence pal, pixels

pal = {
        {0,0,0},
        {128,128,128},
        {255,255,255}
      }
pixels = {                      --16x16
           {0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0},
           {2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2},
           {1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1},
           {0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0},
           {2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2},
           {1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1},
           {0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0},
           {2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2},
           {1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1},
           {0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0},
           {2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2},
           {1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1},
           {0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0},
           {2,0,1,2,0,1,2,0,1,2,0,1,2,0,1,2},
           {1,2,0,1,2,0,1,2,0,1,2,0,1,2,0,1},
           {0,1,2,0,1,2,0,1,2,0,1,2,0,1,2,0}
         }

constant bmp = createDIB( { pal, pixels } )
--         ,pic = addDIB( bmp )                --uncomment this line for an 
error
--         ,pic2 = addEuBmp( { pal, pixels } ) --uncomment this line for an 
error

procedure clickWin( integer self, integer event, sequence parms )

          drawBitmap( win, bmp, 20, 20 )

end procedure
setHandler( win, w32HClick, routine_id( "clickWin" ) )

WinMain( win, Normal )

--end code

I also am having trouble with addXpm.  I think addIcon works ok though.

Thanks,
Phil

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

Search



Quick Links

User menu

Not signed in.

Misc Menu