1. So Al
- Posted by don cole <doncole at pacbell.net> Mar 06, 2006
- 524 views
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 Cole
2. Re: So Al
- Posted by Al Getz <Xaxo at aol.com> Mar 06, 2006
- 544 views
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 Cole Hi there Don, Well, if you mean you want to know what the constants are you could look in the file that has all the constants for that Lib, or if you want to know what the possible params can be for a particular Windows function call (like CreateWindow(...) or whatever) you would have to go to the Microsoft library site and type in "CreateWindow" and a whole bunch of info will come up in your browser, then you pick one and read it. The WS_XXXXXX prefixed constants you were talking about are mostly shown with the CreateWindow function i think, so if you look that up you'll find those. Another way is to download the SDK if you have a fast connection, or order the SDK disk if you dont. There was an old version of SDK help available and i bet it still is somewhere on the web. It's only a 10 meg download yet it has 90 percent of all the Windows functions (maybe more) listed in a sort of orderly fashion that makes finding different things a little easier. If you could get ahold of a copy that would help i think. Another idea would be to start a Euphoria help project for Windows, which i started a while back but never got back to update it. It was going to be complete Windows help for programming in Euphoria along with help with some Eu user contributed Libs, but now im thinking it would be better to do one about Windows only. It's in the archives. Oh yeah, BTW, i had to do the same thing in one of my programs as you wanted to do...keep a window hidden until the user opened it...rather than have it pop up and then disappear (which is sort of weird) so i used WS_DLGFRAME for the window 'style' and now the window doesnt show until the user actually clicks something to make it appear. Much nicer than having it flash when the program first opens. Take care, Al And, good luck with your Euphoria programming! My bumper sticker: "I brake for LED's"
3. Re: So Al
- Posted by Bernie Ryan <xotron at bluefrog.com> Mar 06, 2006
- 533 views
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
4. Re: So Al
- Posted by don cole <doncole at pacbell.net> Mar 06, 2006
- 502 views
- Last edited Mar 07, 2006
Bernie Ryan wrote: <snip to save space> Hello Bernie, Thank you for your your response. I will read and study it but it will take some time. Don Cole