getSysColor

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

I'm trying to finish up my Windows Termometer program.
I'm using Cuny's Win32Lib.
When I run the EX15 example, everything is okay, but if I modify it just to
add my own bitmaps (to draw  L.E.D. like digits) I get an error on
getSysColor not being defined...
Surprisingly, neither in Win32Lib or the enclosed includes did appear any
references to it...
Where is it defined?. What I'm doing wrong?.
Jesus-madness increasing.

Here is the code:

-- Bitmap drawing of digit characters, in L.E.D. fashion

include win32lib.ew

constant StaticWin =
    create( Window, "WINdows TERmometer", 0, Default, Default, 300, 100, 0 )

constant bmSign =
    create( Bitmap, "", StaticWin, 20, 20, 32, 32, 0 )
constant bmLed1 =
    create( Bitmap, "", StaticWin, 120, 20, 32, 32, 0 )
constant bmLed2 =
    create( Bitmap, "", StaticWin, 220, 20, 32, 32, 0 )
constant bmdot =
    create( Bitmap, "", StaticWin, 320, 20, 32, 32, 0 )
constant bmLed3 =
    create( Bitmap, "", StaticWin, 420, 20, 32, 32, 0 )


-- action to take when the window opens

global procedure onLoad_StaticWin()
    integer rgbColor

    -- get the button face color
    rgbColor = getSysColor( COLOR_BTNFACE )

    -- change the window color
    setWindowBackColor( StaticWin, rgbColor )

    setBitmap( bmSign, "plus.bmp" )
    setBitmap( bmLed1, "1.bmp" )
    setBitmap( bmLed2, "2.bmp" )
    setBitmap( bmDot,  "dot.bmp" )
    setBitmap( bmLed3, "3.bmp" )

end procedure

-- tell Windows when to do the action
    onLoad[StaticWin] = routine_id( "onLoad_StaticWin" )

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

Search



Quick Links

User menu

Not signed in.

Misc Menu