Graphics N' Stuff

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

>Wha?
>
>No realy, what I meant to say was .... WHA????
>Mike The Spike
>
>PS. Ten bucks if you can give me a reason, *any* reason, why 
>this code makes sense.

Here goes, MTS

1) I'm a newbie. 
2) I was careless in cutting and pasting the code. 
3) I was overly excited in writing a small piece of code that worked.
4) I was in a rush to send it so I could get feedback on what to do next.
5) An expert such as yourself should of been able to figure out the errors.

Here's the code  -

include getsysms.ew
include Win32Lib.ew
        without warning

integer xScreen, yScreen
  xScreen = GetSystemMetrics( SM_CXSCREEN )
  yScreen = GetSystemMetrics( SM_CYSCREEN )

constant
win = create( Window, "", 0, 0, 0, xScreen, yScreen, {WS_POPUP}),
button_exit = create( PushButton, "Exit", win, 40, 500, 50, 50, 0),  

top_left_bmp = create( Bitmap, "", win, 0, 0, 32, 100, 0),
top_right_bmp = create( Bitmap, "", win, xScreen - 32, 0, 32, 100, 0),
bottom_left_bmp = create( Bitmap, "", win, 0, yScreen - 100, 32, 100, 0),
bottom_right_bmp = create( Bitmap, "", win, xScreen - 32, yScreen - 100,
32, 100, 0),

top_480_bmp = create( Bitmap, "", win, 32, 0, 576, 16, 0),
left_480_bmp = create( Bitmap, "", win, 0, 100, 32, 280, 0),
right_480_bmp = create( Bitmap, "", win, xScreen - 32, 100, 32, 280, 0),
bottom_480_bmp = create( Bitmap, "", win, 32, yScreen - 16, 576, 16, 0),

top_600_bmp = create( Bitmap, "", win, 608, 0, 160, 16, 0),
left_600_bmp = create( Bitmap, "", win, 0, 380, 32, 120, 0),
right_600_bmp = create( Bitmap, "", win, xScreen - 32, 380, 32, 120, 0),
bottom_600_bmp = create( Bitmap, "", win, 608, yScreen - 16, 160, 16, 0),

title_bmp = create( Bitmap, "", win, xScreen - 382, 16, 348, 73, 0),


setWindowBackColor( win, Black )

procedure draw_window( integer x1, integer y1, integer x2, integer y2 )
          setBitmap( top_left_bmp, "nwc.bmp" )
          setBitmap( top_right_bmp, "nec.bmp" )
          setBitmap( bottom_left_bmp, "swc.bmp" )
          setBitmap( bottom_right_bmp, "sec.bmp" )

          setBitmap( top_480_bmp, "topwide480.bmp" )
          setBitmap( left_480_bmp, "west480.bmp" )
          setBitmap( right_480_bmp, "east480.bmp" )
          setBitmap( bottom_480_bmp, "bottomwide480.bmp" )
          
          setBitmap( top_600_bmp, "topwide600.bmp" )
          setBitmap( left_600_bmp, "west600.bmp" )
          setBitmap( right_600_bmp, "east600.bmp" )
          setBitmap( bottom_600_bmp, "bottomwide600.bmp" )
          
          setBitmap( title_bmp, "title.bmp" )
end procedure
    onPaint[win] = routine_id( "draw_window" )

procedure quit_program()
          closeWindow(win)
end procedure
    onClick[button_exit] = routine_id( "quit_program" )

    WinMain(win, Normal)

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

Search



Quick Links

User menu

Not signed in.

Misc Menu