Re: So Al

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

don cole wrote:
> 
> Hello Al,
> 
> You with your winClass and Judith with her win32lib have written these 
> 
> wrappers to send messages to windows DLLs.
> 
> You use terms like WS_MAXIMIZE, WS_MINIMIZE, etc. to sent these mesages.
> 
> So my question is how do you know that WS_MAXIMIZE is in that DLL ?
> 
> Where could I get a list of all the things in these DLLs ?
> 

Don:

   Here is some information from my docs in w32engin.ew that
   may be helpful.

   What's all those weird names used in my windows programming book ?

   THE WINDOW'S SECRET CODES REVEALED.

   You will notice in a window book that each variable name is prefixed with
   some lower case letters that tell the programmer what the variable
   contains. Some of these letters are.

   prefix     meaning                                size      Euphoria
   _________________________________________________________________________

   b       byte                                      8 bits    C_UCHAR
   f       boolean ( true / false )                 16 bits    C_UINT
   c       character                                 8 bits    C_CHAR
   d       double precision floating point          64 bits    C_DOUBLE
   dw      double word                              32 bits    C_LONG
   f       flag bits                                16 bits    C_USHORT
   gh      global handle                            32 bits    C_LONG
   h       handle                                   32 bits    C_LONG
   hwnd    window handle                            32 bits    C_LONG
   l       long integer                             32 bits    C_LONG
   lp      long pointer                             32 bits    C_POINTER
   lpsz    pointer to Null terminated string        32 bits    C_POINTER
   n       short integer                            16 bits    C_SHORT
   p       pointer                                  32 bits    C_POINTER
   pt      x y point coord. packed into 32 bits     32 bits    C_ULONG
   rgb     color value packed into 32 bits          32 bits    C_INT
   sz      pointer to Null terminated string        32 bits    C_POINTER
   w       short unsigned integer                   16 bits    C_USHORT

   This is a list of only some of them a more complete list may be in your
   book or you may find them on the Web. As you can see that the names stand
   for something so you may be able to guess at some of them. Look at some
   of the variables in a programming book. If you see a * ( star ) in the name
   of variable it is refering to a pointer, a & ( amphersand ) in a book is
   refering to the address of some data structure. A period in used middle of
   a variable name rect.x means to use x member of the rect structure. You
   will also see rect_ptr->rect.x the -> combines the rect_ptr with the rect
   structure so that it can access the x member with the pointer. Don't worry,
   you will not need to get that deep into "C" just be aware that these will
   appear in some books.

   You will find some function names have "A", "W" and "Ex" append to them.
   The "A" and "W" are used when a function uses character strings.
   The "A" uses ANSI or ASCII type characters in it's strings.
   The "W" uses WIDE or UNICODE type characters in it's strings.

   Sometimes books or code will not have the "A" or "W" append to the name
   but are using the appended letter internally. A "C" compiler will
   internally determine whether to use "A" or "W" function by looking at
   the text parameters passed by the function. A rule of thumb is if the
   function has a parameter that is using any form of text then you must
   append an "A" or "W" to the function name. Most prorams that you write
   you can use "A" the ASCII type characters.

   The "Ex" stands for EXTRA parameters in the function. You may see a
   function with the same name ( with NO "Ex" ) that has less parameters.
   The important thing to remember that if you declare a function and
   W32ENGIN.EW can't locate it, check the following.
   1. Is the function name spelled correctly. ( CASE SENSITIVITY )
   2. Does the function have a "A", "W" and "Ex" appended to its name.
   3. Is the function name in the master list.
   4. Is the function located in DLL version installed on your system.
   UNICODE can be used, but you will need to understand support routines,
   additional descriptions, and string support. For now use ANSI functions.

   You will notice CONSTANTS used in windows have upper-case names. Windows
   uses constants to represent numeric values that are used to define
   some feature or action in windows. Just as in Euphoria the constants are
   fixed values and can not be modified or changed. These names are only used
   so the programmer can understand what a number represents, can you imagine
   trying to keep track of all these numbers. Window constant names are formed
   in a logical way. If you look at the constants in win32api library you will
   notice the names define the use. Some constants start with letters then
   are followed by a UNDERSCORE and more letters. The letters before the
   underscore are another secret code by windows to tell the programmer how
   to use the constant. Some examples of the meanings of these prefixes
   that come before the undescore are:

   WM_DESTROY -- any WM_ is Window Message
   WS_CHILD   -- any WS_ is Window Style
   CS_VREDRAW --            Class Style
   ODT_MENU   --            Owner Draw Type
   ODA_FOCUS  --            Owner Draw Action

   You will notice that every constant's name makes logical sense in the
   context of its use. If the constant is used for a control it will use
   the prefixed letters to abreviate that control's name and use. Look at the
   context of any constant that is used in a program and you will able to
   guess what the constant represent and how it is used.

   Now goto the demo's and read the comments and look at a windows programs
   in a book or get some "C" example programs off the web.




Bernie

My files in archive:
WMOTOR, XMOTOR, W32ENGIN, MIXEDLIB, EU_ENGIN, WIN32ERU, WIN32API 

Can be downloaded here:
http://www.rapideuphoria.com/cgi-bin/asearch.exu?dos=on&win=on&lnx=on&gen=on&keywords=bernie+ryan

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

Search



Quick Links

User menu

Not signed in.

Misc Menu