1. getSysColor

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 message » categorize

2. Re: getSysColor

Jesus wrote:

>>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...

I'm not sure I understand the error. I tried running your example code =
(commenting out the bitmaps, which I don't have, and adding a WinMain() =
call), and didn't get any errors.

The function getSysColor() is defined as global in WIN32LIB.EW, and is =
supposed to be in all three platforms of Win32. (insert puzzled =
expression here)

I suspect I'm misunderstanding your question.

-- David Cuny

new topic     » goto parent     » topic index » view message » categorize

3. Re: getSysColor

Thanks, David. It was no fault of Win32lib but of the text editor I use. I
run Euphoria from inside it, and was losing the path sometimes. I fixed it
by putting the whole path to the WIN32LIB.
Jesus.
(now, the end is closer...)

----------
De: David Cuny <dcuny at DSS.CA.GOV>
A: EUPHORIA at LISTSERV.MUOHIO.EDU
Asunto: Re: getSysColor
Fecha: lunes 1 de junio de 1998 18:31

Jesus wrote:

>>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...

I'm not sure I understand the error. I tried running your example code
(commenting out the bitmaps, which I don't have, and adding a WinMain()
call), and didn't get any errors.

The function getSysColor() is defined as global in WIN32LIB.EW, and is
supposed to be in all three platforms of Win32. (insert puzzled expression
here)

I suspect I'm misunderstanding your question.

-- David Cuny
----------

new topic     » goto parent     » topic index » view message » categorize

Search



Quick Links

User menu

Not signed in.

Misc Menu