1. RE: where to find info of win32lib constant ?
- Posted by Matthew Lewis <matthewwalkerlewis at YAHOO.COM> May 24, 2001
- 412 views
> -----Original Message----- > From: martin.stachon at worldonline.cz > Try ftp://ftp.inprise.com/pub/delphi/techpubs/delphi2/win32.zip > (7962 kB) Actually, an easier d/l would be winconst.ew in the archives. It has virtually all the constants you'll need. Matt
2. RE: where to find info of win32lib constant ?
- Posted by Bernie Ryan <xotron at localnet.com> May 25, 2001
- 416 views
jimmy17 at indosat.net.id wrote: > hi... > > i'm currently learning win32lib, but i have trouble about win32lib > constant. > for example > > create(aClass, sTitle, aParent, iX, iY, iCx, iCy, aFlags) > > where can i find information about aFlags ? > > thanks > > jimmy: There are about 1600 procedures and functions and about 6000 constants used in windows programming ( and still growing ). The only way to know what constants to use is to get a windows reference and lookup the particular function you are interested in using. All this information is available at the MS WEB site or from the other references that various list user have given you to download. And important thing to understand about windows constants is to understand how the names are formed. The first few letters of the name ( before the underscore ) represents what group the constant is used for. examples: WS_......... -- Window Style WM_......... -- Window Message CB_......... -- Combo Box CBS_........ -- Combo Box Style CS_......... -- Class Style DI_......... -- Draw Icon DS_......... -- Dialog Style ETC. The rest of the constant name ( after the underscore ) defines what the constant effects or controls. The numeric value of each constant is assigned so that they use unique BIT POSITIONS and when they are logically OR-ED together they use less space in the program ( used as a single parameter in a function ) but EACH IS UNIQUE and DISCERNABLE from the other. example: If you OR-ED all of the following constants -- Window Styles global constant WS_OVERLAPPED = #0, WS_POPUP = #80000000, WS_CHILD = #40000000, WS_MINIMIZE = #20000000, WS_VISIBLE = #10000000, WS_DISABLED = #8000000, WS_CLIPSIBLINGS = #4000000, WS_CLIPCHILDREN = #2000000, WS_MAXIMIZE = #1000000 The result would be #FF000000 so we would only have to use this single value represent all of the above window styles, yet windows can know each style by masking out certain bits. This saves having to pass a seperate parameter for each style in some windows function. I hope this helps you to better understand whats going on in windows. Remember that the constants values are determined and defined by MS windows not by the w32lib that is why you have to go to a MS documentation to find out more about them. Bernie