1. Win32lib questions...

--Message-Boundary-14061
Content-type: text/plain; charset=US-ASCII
Content-description: Mail message body

Heya all!

I'm trying to get these things to work, but unfortunatly, to no avail.

1st, setPenColor, setTextColor, these don't seem to work.
2nd, drawRectangle, drawRoundRectangle, drawPolygon - these
don't seem to work either.

The one I have is "Bleeding Edge" 0.45r

I followed directions, everything seems right (code included), could I
possibly be doing something wrong?

TIA,

Blessed Be! --"LEVIATHAN"



--Message-Boundary-14061
Content-type: text/plain; charset=US-ASCII
Content-description: Text from file 'New project2.exw'

--==========================================================================--

-- E:\euphoria\fmj\New project2.exw

-- code generated by EuDesigner v 1.0 Alpha

--==========================================================================--



-- without warning              -- Uncomment after testing!

include win32Lib.ew           -- David Cuny's Win32 Euphoria wrapper

sequence pointset1
sequence pointset2
pointset1 = { {281,166},{223,166},{223,329},{466,329},{466,166},{396,166} }
pointset2 = { {497,166},{480,166},{480,244},{628,244},{628,166},{602,166} }


--==========================================================================--

--                            object declarations                           --

--==========================================================================--

-- newForm



global constant newForm=

  create(Window, "FMJ HUD Designer", 0, 287, 284, 644, 360,  0)
  setWindowBackColor(newForm, 0)
  setIcon(newForm, IDI_APPLICATION)
  setPenColor(newForm, rgb(81,144,0))
--      drawRectangle(newForm, False, 223, 166, 466, 329)
--      drawRectangle(newForm, False, 480, 166, 628, 244)
  setPenWidth(newForm, 3)
  drawPolygon(newForm, False, pointset1)
  drawPolygon(newForm, False, pointset2)
--  setPenColor(newForm, 13520)

-- newFormBitmap2

global constant newFormBitmap2=

  create(Bitmap, "newFormBitmap2", newForm, 0, 0, 640, 134,  0)

  setBitmap(newFormBitmap2, "fmj3.BMP")



-- newFormStatText3

global constant newFormStatText3=

create(CText, "FMJ HUD Designer (Version Plan Alpha 0.00.10)", newForm, 0,
  136, 640, 16,  0)



-- newFormStatText4

global constant newFormStatText4=

  create(LText, "Name of hudfile to load/save:", newForm, 0, 161, 144, 16,  0)



-- newFormEditText5

global constant newFormEditText5=

  create(EditText, "", newForm, 0, 176, 168, 24,  0)



-- newFormButton6

global constant newFormButton6=

  create(PushButton, "Load", newForm, 168, 168, 32, 16,  0)



-- newFormButton7

global constant newFormButton7=

  create(PushButton, "Save", newForm, 168, 184, 32, 16,  0)



-- newFormStatText9

global constant newFormStatText9=

  create(LText, "HUD function:", newForm, 0, 216, 72, 16,  0)



-- newFormRadio10

global constant newFormRadio10=

  create(Radio, "On", newForm, 80, 220, 32, 12,  0)



-- newFormRadio11

global constant newFormRadio11=

  create(Radio, "Off", newForm, 112, 220, 32, 12,  0)



-- newFormStatText12

global constant newFormStatText12=

  create(LText, "HUD Function controls:", newForm, 284, 160, 112, 16,  0)



-- newFormStatText13

global constant newFormStatText13=

  create(LText, "X Position:", newForm, 232, 181, 56, 16,  0)



-- newFormStatText14

global constant newFormStatText14=

  create(LText, "Y Position:", newForm, 232, 206, 56, 16,  0)



-- newFormEditText15

global constant newFormEditText15=

  create(EditText, "", newForm, 288, 180, 56, 20,  0)



-- newFormEditText16

global constant newFormEditText16=

  create(EditText, "", newForm, 288, 204, 56, 20,  0)



-- newFormStatText17

global constant newFormStatText17=

  create(LText, "X Size:", newForm, 232, 234, 56, 16,  0)



-- newFormStatText18

global constant newFormStatText18=

  create(LText, "Y Size:", newForm, 232, 261, 56, 16,  0)



-- newFormEditText19

global constant newFormEditText19=

  create(EditText, "", newForm, 288, 232, 56, 20,  0)



-- newFormEditText20

global constant newFormEditText20=

  create(EditText, "xryi", newForm, 288, 260, 56, 20,  0)



-- newFormStatText21

global constant newFormStatText21=

  create(LText, "Shader/Graphic:", newForm, 244, 284, 80, 16,  0)



-- newFormEditText22

global constant newFormEditText22=

  create(EditText, "fksh", newForm, 228, 304, 112, 20,  0)



-- newFormRadio25

global constant newFormRadio25=

  create(Radio, "X Value", newForm, 485, 208, 56, 16,  0)



-- newFormRadio26

global constant newFormRadio26=

  create(Radio, "Y Value", newForm, 485, 224, 56, 16,  0)



-- newFormButton27

global constant newFormButton27=

  create(PushButton, "Help!", newForm, 8, 272, 80, 16,  0)



-- newFormStatText27

global constant newFormStatText27=

  create(LText, "(HUD Bars Use Only:)", newForm, 498, 160, 104, 16,  0)



-- newFormStatText28

global constant newFormStatText28=

  create(LText, "Pixels Per Value:", newForm, 488, 180, 56, 24,  0)



-- newFormEditText29

global constant newFormEditText29=

  create(EditText, "", newForm, 546, 179, 40, 24,  0)



-- newFormRadio30

global constant newFormRadio30=

  create(Radio, "Horizontal Bar", newForm, 546, 208, 82, 15,  0)



-- newFormRadio31

global constant newFormRadio31=

  create(Radio, "Vertical Bar", newForm, 546, 224, 81, 16,  0)



-- newFormButton32

global constant newFormButton32=

  create(PushButton, "Configure", newForm, 8, 288, 80, 16,  0)



-- newFormButton33

global constant newFormButton33=

  create(PushButton, "About", newForm, 88, 272, 80, 16,  0)



-- newFormButton34

global constant newFormButton34=

  create(PushButton, "Exit", newForm, 88, 288, 80, 16,  0)



-- newFormComboBox34

global constant newFormComboBox34=

  create(DropDownList, "", newForm, 0, 232, 168, 21,  0)



-- newFormStatText34

global constant newFormStatText34=

  create(LText, "Red", newForm, 362, 219, 64, 13,  0)



-- newFormStatText35

global constant newFormStatText35=

  create(LText, "Green", newForm, 362, 243, 65, 13,  0)



-- newFormStatText36

global constant newFormStatText36=

  create(LText, "Blue", newForm, 362, 267, 65, 13,  0)



-- newFormStatText37

global constant newFormStatText37=

  create(LText, "Transparency", newForm, 360, 292, 68, 13,  0)



-- newFormEditText38

global constant newFormEditText38=

  create(EditText, "", newForm, 428, 216, 36, 20,  0)



-- newFormEditText39

global constant newFormEditText39=

  create(EditText, "", newForm, 428, 240, 36, 20,  0)



-- newFormEditText40

global constant newFormEditText40=

  create(EditText, "", newForm, 428, 264, 36, 20,  0)



-- newFormEditText41

global constant newFormEditText41=

  create(EditText, "", newForm, 428, 288, 36, 20,  0)



-- newFormStatText42

global constant newFormStatText42=

  create(CText, "Color Control", newForm, 362, 192, 102, 13,  0)




WinMain(newForm, Normal)
--Message-Boundary-14061--

new topic     » topic index » view message » categorize

2. Re: Win32lib questions...

On Thu, 24 Aug 2000 17:51:46 -0700, LEVIATHAN wrote:

>Heya all!
>
>I'm trying to get these things to work, but unfortunatly, to no avail.
>
>1st, setPenColor, setTextColor, these don't seem to work.
>2nd, drawRectangle, drawRoundRectangle, drawPolygon - these
>don't seem to work either.

You are trying to draw stuff on a window that isn't there yet.  Try putting
them into your 'onPaint' routine (this way they won't disappear when
another window covers up your window).


procedure onPaint_newForm( integer x1, integer y1, integer x2, integer y2 )
  setPenColor(newForm, rgb(81,144,0))
--      drawRectangle(newForm, False, 223, 166, 466, 329)
--      drawRectangle(newForm, False, 480, 166, 628, 244)
  setPenWidth(newForm, 3)
  drawPolygon(newForm, False, pointset1)
  drawPolygon(newForm, False, pointset2)
--  setPenColor(newForm, 13520)
end procedure
onPaint[newForm] = routine_id( "onPaint_newForm" )

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

3. Re: Win32lib questions...

<snips!>

Thanxya Brian! :)

<scratches head>
<makes a mental note of this>

Gee, I wish something around here that said to do it on a onPaint...

Blessed Be! --"LEVIATHAN"

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

4. Re: Win32lib questions...

Yes!  This kind of lack in documentation is the source of *many* questions
here, I think.  (Not really sure how to fix it, though.)

Dan Moyer

----- Original Message -----
From: "LEVIATHAN" <leviathan at USWEST.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Thursday, August 24, 2000 6:46 PM
Subject: Re: Win32lib questions...


> <snips!>
>
> Thanxya Brian! :)
>
> <scratches head>
> <makes a mental note of this>
>
> Gee, I wish something around here that said to do it on a onPaint...
>
> Blessed Be! --"LEVIATHAN"

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

5. Re: Win32lib questions...

> Yes!  This kind of lack in documentation is the source of *many*
> questions here, I think.  (Not really sure how to fix it, though.)
>
> Dan Moyer
>

Easy. Post addendums somewhere. Make it known.

I'll admit, last I heard about David Cuny, he was just a busy guy,
bustin' his butt on some four major projects at once :)

Blessed Be! --"LEVIATHAN"

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

6. Re: Win32lib questions...

"Leviathan" wrote:

> Gee, I wish something around here that said to do it on a onPaint...

It's buried in the middle of the documentation, where few dare to read.

-- David Cuny

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

7. Re: Win32lib questions...

LEVIATHAN,

No, what I meant (but didn't say) was that since there is a new open source
project going on to continue the development of Win32Lib, questions like
yours & many other of us could/should better be handled in the new
documentation that will originate from that project.  That's what I wasn't
sure how it should be done, 'cause there's lots of questions "like" yours
that occur, as in how to do relatively simple things which *are* provided
for but don't always get explained at the relevant point in the
documentation, so people use the procedures provided, but don't get them to
implement quite sufficiently.

Dan


----- Original Message -----
From: "LEVIATHAN" <leviathan at USWEST.NET>
To: <EUPHORIA at LISTSERV.MUOHIO.EDU>
Sent: Thursday, August 24, 2000 7:00 PM
Subject: Re: Win32lib questions...


> > Yes!  This kind of lack in documentation is the source of *many*
> > questions here, I think.  (Not really sure how to fix it, though.)
> >
> > Dan Moyer
> >
>
> Easy. Post addendums somewhere. Make it known.
>
> I'll admit, last I heard about David Cuny, he was just a busy guy,
> bustin' his butt on some four major projects at once :)
>
> --"LEVIATHAN"

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

8. Re: Win32lib questions...

>> Yes!  This kind of lack in documentation is the source of *many*
>> questions here, I think.  (Not really sure how to fix it, though.)
>>
>> Dan Moyer
>>
>>
>Easy. Post addendums somewhere. Make it known.
>
>I'll admit, last I heard about David Cuny, he was just a busy guy,
>bustin' his butt on some four major projects at once :)
>
>Blessed Be! --"LEVIATHAN"
>

One of the problems is a "demarcation" issue. I believe that the onPaint
functionality is standard Windows stuff. Meaning that if you were writing in
C++ or other low-level languages (VB, Delphi, et al are no longer low-level)
for Windows, you'd have to know this is how onPaint is to be used. So should
Euphoria coders document "Windows Programming Techniques" in win32lib or
should one read other books to get this info? I really don't know the
answer. Another approach might be to have a high-level routine either in
win32lib or using win32lib that provides automatic Window rendering.
---
cheers
Derek

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

9. Re: Win32lib questions...

> "Leviathan" wrote:
>
> > Gee, I wish something around here that said to do it on a onPaint...
>
> It's buried in the middle of the documentation, where few dare to
> read.
>

The few, including I :)

Blessed Be! --"LEVIATHAN"

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

Search



Quick Links

User menu

Not signed in.

Misc Menu