Re: Win32Libv50: How make window invisible (initially?)?

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

> From: Brian Broker

Wolf's solution was simply too obvious for most of us to think of. :(  We
got all wrapped up in the API, and forgot about simple programming
techniques.  But this brings something else to mind.

Has anyone created a little library (it shouldn't be too hard, I think) to
automatically size/position controls based on the display settings.  That
seems to be a big missing point in win32lib, and maybe it shouldn't be a
part of the main lib, but it would make app's look much nicer when other
people run them on different machines.  I've thought about doing something
like this, but I guess I haven't gotten up enough energy to do anything
about it.
<snip>

> To
> find out what goes where and what constants are used for
> what, just search
> http://msdn.microsoft.com/
>
> For example, SetWindowPosition is actually called 'SetWindowPos'.  All
> you'd want to know about this function can be found at
> http://msdn.microsoft.com/library/psdk/winui/windows_2blf.htm
>

You can also check out the Win32.hlp file that's in the archives.  I believe
this was originally a Borland file.  It's pretty old, and some of the
information has been superceded, but it's still good for most stuff--and
often quicker than pulling up MS's web page.

<snip>

> But the best way to learn how to use DLL routines in your
> program is to
> study win32lib itself.  Basically, it can be a real pain in the butt
> working with the Windows API using Euphoria.  The hardest
> part is getting
> your C structures correct, but Win32Lib has some lower-level
> routines that
> make it a bit less hellish.  And, once again, the best way to
> learn how
> it's done is to study the blood and guts of Win32Lib.

C structures can be a real pain to work with in Eu, but they don't have to
be.  David came up with a pretty elegant solution IMHO, and Derek and
other's (like me) have come up with some enhancements.  My 'contribution'
was using functions to populate the structures.  That way, you only write
the 'store( struct, member, value)' code once (and if you look at my
structure declarations, the names get pretty long).  One thing to remember
when debugging your code:  if it's not working, and you can't see any reason
why, check the structure size and member values/types.  Many structures used
in the Win32 API need the size to be exact, and for you to store the size of
the structure in the first element (mainly for versioning control).

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

Search



Quick Links

User menu

Not signed in.

Misc Menu