# Arwen Win32 Library

NOTE: This is windows 32-bit only. For a 32/64bit, cross-platform library see pGUI
Introduction
Event Handling
Creating Controls
Windows
Buttons
MarkBoxes
Group boxes
Editable controls
Labels
Tool bars
Status bars
Scroll bars
Track bars
Progress bars
Menus
List boxes
Tab controls
HyperText controls
Destroying Controls
Moving between Controls (using TAB)
Accelerator Keys
Mouse Routines
Clipboard functions
Dib sections & Bitmaps
DibSection Library for Arwen
Icons & Cursors
Timers
Common Dialogs
Windows messages
Structures
To do list..
Bugs

GLOBAL ATOMS
Several groups of global atoms are visible to the application program:
1) All the Win32 constants that have been defined in the include files
2) Constant names of all the linked Win32 functions - perhaps you may wish to directly call a Win32 function, who knows?
3) `void` - Strictly speaking void is not an atom; it is declared as a global object. Many library routines will return some value but most of these can be ignored. `void` is a convenient variable to assign the return value. It will save having to create yet another scratch variable. Just be careful that you are not tempted to read the value assigned to void since it is being constantly overwritten.
4) UNDEFINED - This a flag used to represent an undefined state for some of the vasriables used in the library. You would use it to dis-associate controls from their handlers.
5) IDLE - Used to enable a routine to run continuously (looping).
6) True & False - Boolean values as expected. Please note that Win32 functions do not always represent failure as 0 or success as 1, however, many functions in arwen do return boolean values to indicate the outcome. Please consult the documentation for specific details.
7) CLIPBOARD - Used to access the clipboard text functions when invoking getText() or setText().

THINGS THAT STILL NEED TO BE DONE..
Flat tool bar support
finish Menu support (bitmaps..other?)
emulate modality *fully*
icons/bitmap support
setting fonts
some graphic primitives
improve documentation
improve intuitiveness for activating a TabItem and retrieving the open tab
must invalidate the rect that covers the main window when another window is closed. Could use MapWindowPoints() then RedrawWindow()
tidy up DC arrangement - does it need it?
purge the memory allocation code (in arwen.ew) so that buffer overflows can be prevented
finish adding image lists - make separate include file make icon/bitmap references as indexes rather than handles in control creation but bitmaps can be handles otherwise. Ensure the imagelists are destroyed as appropriate Perhaps have some default icons in the base imagelists....
destroy() should properly deal with all parent controls and their children - in particular Windows & toolbars

BUGS
1) If a handler routine for a Status Bar invokes setText() to draw some text on itself and the call is "inlined" (ie, not part of a message trap) then a fatal error occurs. This does not happen with other controls I tested. I think the reason is that when setText() is invoked it sends a message to the Status bar handler which means the handler indirectly calls itself in this situation.