1. Windows API

If your interested in Windows API and would like some tips
on setting up DC's and the likes, heres a great page to read.

http://www.examcram.com/samples/1576108767sc1.htm

Euman
euman at bellsouth.net

5 2 1 - 1 - n - 5  The Doors

new topic     » topic index » view message » categorize

2. Windows API

It seems like Petzold's book is the "bible" for programming
the Windows API. Unfortunately for me, all the examples in
the book are written using C. I don't know C.

I inquired about this on the PowerBasic newsgroup and
found out that someone had converted all of Petzold's
examples from C to PowerBasic. Needless to say I
think this is a very good thing. :)

Has anyone done the same for Euphoria ?? If not,
it's my opinion that it should be done.

jon

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

3. Re: Windows API

On Sat, 16 Oct 1999 22:05:51 -0400, Jon Banquer <jbtech at MPINET.NET> wrote:

>It seems like Petzold's book is the "bible" for programming
>the Windows API. Unfortunately for me, all the examples in
>the book are written using C. I don't know C.

  jon :
       If you down-load my win32api.ew from the recent users page
       of the euphoria archive site. You will find that the demos
       and comments explain how to relate "C" windows programming
       to euphoria windows programming. The library may help you.


  Bernie

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

4. Re: Windows API

Hi Bernie,

Done deal. Thanks for the tip. I'm not against
using anyone's library. Maybe even using
several of  them. Has anyone on the list
combined two or more Euporhia Win32
libraries in an application that they have
written ??

I'm monogamous with my wife. Is there some
sort of law that says I have to be this way
with Win32 libraries for Euphoria ??  :)

I do admit to being totally against insulating
myself from the Windows API or from taking
any advice that advises me to go in this direction.

Thanks to both you and Gary for patiently
answering my questions. I really appreciate
it !!

jon

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

5. Re: Windows API

Bernie Ryan wrote:
>
> On Sat, 16 Oct 1999 22:05:51 -0400, Jon Banquer <jbtech at MPINET.NET> wrote:
>
> >It seems like Petzold's book is the "bible" for programming
> >the Windows API. Unfortunately for me, all the examples in
> >the book are written using C. I don't know C.
>
>   jon :
>        If you down-load my win32api.ew from the recent users page
>        of the euphoria archive site. You will find that the demos
>        and comments explain how to relate "C" windows programming
>        to euphoria windows programming. The library may help you.
>
>   Bernie
  --------------------------

  I didn't find it. Is it under a different name?

     Jack

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

6. Re: Windows API

On Sun, 17 Oct 1999 16:41:48 -0700, Jack Yazel <jyazel at NETSET.COM> wrote:
>
>  I didn't find it. Is it under a different name?
>

Jack
   It is listed as  "Routines for WIN32 Programming" at Euphoria Web Site
   ( for some reason they don't consider it a library )
Bernie

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

7. Re: Windows API

Bernie Ryan wrote:
>
> On Sun, 17 Oct 1999 16:41:48 -0700, Jack Yazel <jyazel at NETSET.COM> wrote:
> >
> >  I didn't find it. Is it under a different name?
> >
>
> Jack
>    It is listed as  "Routines for WIN32 Programming" at Euphoria Web Site
>    ( for some reason they don't consider it a library )
> Bernie

   I found it (w32api20.zip).

   Thanks very much.

      Jack

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

8. Re: Windows API

Jon Banquer wrote:

> Is there some sort of law that says I have to
> be [monogamous]with Win32 libraries for Euphoria ?

Both Win32Lib and VEL insulate the user from the Win32 API to some degree,
making them difficult to integrate. Bernie's toolkit doesn't hide the Win32
API at all.

Although you can still access the Win32 API from Win32Lib, I suspect that
you'll be happier with Bernie's library. My only suggestion would be to use
constant to name the elements of structures, instead of using numeric
indices.

-- David Cuny

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

9. Re: Windows API

(This post may reach the list before my first semi-introductory one)

David Cuny wrote:

>>Jon Banquer wrote:
>>
>> Is there some sort of law that says I have to
>> be [monogamous]with Win32 libraries for Euphoria ?
>
> Both Win32Lib and VEL insulate the user from the Win32 API to some degree,
> making them difficult to integrate. Bernie's toolkit doesn't hide the Win32
> API at all.
>
> Although you can still access the Win32 API from Win32Lib, I suspect that

Does that mean that I could get access to the hWnd handle of a window
created with the win32lib create() function, so as to add other controls?
Or am I grabbing the wrong end of a very large stick?

> you'll be happier with Bernie's library. My only suggestion would be to use
> constant to name the elements of structures, instead of using numeric
> indices.

Regards,

Dave

--
David M Foulds                     | e: dmfoulds at knowledgeassociates.com
Applications Developer             | t: +44 (0) 1223 421834
Knowledge Associates International | f: +44 (0) 1223 421284
http://www.knowledgeassociates.com |

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

10. Re: Windows API

David Foulds wrote:

> Does that mean that I could get access to the hWnd handle
> of a window created with the win32lib create() function, so
> as to add other controls?

You can get a handle using getHandle(), but if you created other controls
with something other than create(), you couldn't use Win32Lib's routines on
them, since it wouldn't have the data structure set up correctly.

At one point I was considering extending Win32Lib so that it would be
relatively easy to add new classes of controls. But in theory that's the
point of Llama. If there's demand for it, I could add a new create command
along these lines:

   createClass( class, className, name, parent, x, y, cx, cy, flags )

For example:

   createClass( BUTTON, "button", "My Button", TheWindow, 10, 10, 40, 30,
        { WS_CHILD, WS_VISIBLE, WS_AUTOCHECKBOX, WS_TABSTOP } )

would create a checkbox button, or:

    createClass( STATUSCLASSNAMEA, COMMON_CONTROL, 0, 0, 500, 32,
        { WS_CHILD, WS_VISIBLE, WS_CLIPSIBLINGS, CCS_BOTTOM } )

would create a status bar. You would still need to trap all the events
manually for the specialized controls, but at least you would have access to
the default routines that Win32Lib provides.

The actual implementation of createClass would be trivial: I could just
create a dummy class TempClass that would hold values. createClass would
initialize the class to the values, and then create the object using that
class:

    global function createClass( ... )

        -- set up the class
        className[ TempClass ] = theClassName
        classType[ TempClass ] = theClassType
        classStyle[ TempClass ] or_all( theStyleFlags )

        -- create an object of the new class
        return create( TempClass ... )

    end function

The create() function would have to be slightly tweaked as well, to work
properly with Windows.

My feeling is that I need to get Llama/Win32 released Real Soon Now instead,
so it's done properly instead of with a hack.

-- David Cuny

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

11. Re: Windows API

Hi David,

In one of your posts last week you mentioned that Llama was low on
your priority list. Can you explain why this is the case in
a little more detail ??

> My feeling is that I need to get Llama/Win32 released Real Soon
>Now instead, so it's done properly instead of with a hack.

Does this represent a change of heart ? It seems to me that if Llama
was designed with the concept of making it easy for the user to expand,
everyone would benefit from this. Maybe this makes it harder to develop
a product  that you eventually might want to sell ???  Not real sure I
understand ??? Maybe it's just because it's much harder to develop an
easily expandable and understandable (for the user) Win32 library ???

In any case, being very new to Euphoria, I would appreciate some
clarification.

Thank you for your time,

jon

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

12. Re: Windows API

Jon Banquer wondered:

> In one of your posts last week you mentioned that
> Llama was low on your priority list. Can you explain
> why this is the case in a little more detail ??

The reason that Win32Lib gets attention is that people are actually using it
to do useful things.

The main problem that I'm having with Llama is with GTK+ graphics. GTK+
requires that I either (1) define a canvas-like control that can be drawn
on, or use xlib to do the rendering.

At one point, I had wrapped a good chunk of xlib, but the code seems to have
disappeared. [Pete - do you still have the copy I sent you?] I don't really
want to have to fool around with xlib - it adds another level of complexity
that I'd rather do without.

The other option is to add a 'canvas' control into Llama. That would be yet
another divergence between Win32Lib and Llama. This isn't necessarily a bad
thing. For one thing, I could make graphics rendered to the canvas
persistant - you wouldn't have to redraw them each time the window is
damaged.

I haven't decided between the two. If someone has already wrapped xlib, I'd
probably go with the first option.


> Maybe this makes it harder to develop a product
> that you eventually might want to sell?

Not even a consideration.

One major goal in making Llama more open was to get the load of me in terms
of development. For example, Greg Harris helped a lot in porting classes
from Win32Lib to the posted version of Llama.

I have a Win32 and a GTK version of Llama up and running based on the same
core library. The GTK version has enough controls to be useful - PushButton,
CheckBox, Radio, Menu, and so on. I haven't posted it because it's coded
around the Win32 GTK DLLs, and hasn't been tested under Linux recently. I
suspect that th

The Win32 version, in contrast, only has a Window and PushButton class
working, although it shouldn't be too hard to convert the classes from prior
versions of Llama to add support for new controls quickly.

I'll try to get the Win32 version onto my web page in the next couple of
days.

-- David Cuny

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

13. Windows API

Hello.

This is for people who are looking for info on how to program in
Euphoria for Windows.  I just found this while looking for something
else which was related to me in some email I got from Microsoft.

Goto:
http://www.ecma.ch/
and click on "Standards".

The one you want is #234:
"This ECMA Standard defines the Windows Application Program
Interfaces to the C Programming Language."

It comes in a self-expanding MS Word file or 3 Adobe Acrobat PDF
files of about 1.36M.

On page 5 it says that it is for Windows v3.1.  Does this carry over
to Windows 95 since v3.1 programs can run under 95?

Terrence L. Domjan
questor at fast.net

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

Search



Quick Links

User menu

Not signed in.

Misc Menu