*
Warning * The format is completely revamped
Now it is just Include
xControl.ew
This will allow me to add new controls without each one requiring an include statement in the main file.
Function: MenuID = xControl( PicMenu, “Title”,
Parent, 0,
0, 0,
0, 0,
Bitmap )
Function: MenuID = xControl( PicMenuItem, “Title”,
Parent, 0,
0, 0,
0, 0,
Bitmap )
Creates either a new sub menu or a menu item and returns it's ID. The extra fields colored in red are not used in this control but needed for uniformity.
Bitmap:
Either null (0) for no bitmap, a bitmap handle, or the full name of the bitmap file
Procedure: setMenuMaskColor( newColor )
Sets the mask color for transparency.
newColor:
Zero is the default if it is not changed
Example:
include win32lib.ew
include xControls.ew
without warning
constant
main = create( Window, "", NULL, 0.25, 0.25, 0.5, 0.5, 0 ),
File = create( Menu, "File", main, 0, 0, 0, 0, 0, 0 ),
File_New = xControl( PicMenuItem, "New", File, 0, 0, 0, 0, 0, "New.bmp" ),
Data = xControl( PicMenuItem, "Data", File_Pref, 0, 0, 0, 0, 0, "Data.bmp" ),
Sources = xControl( PicMenuItem, "Sources", File_Pref, 0, 0, 0, 0, 0, "Links.bmp" )
WinMain( TestWin, Normal )
Version 1.0
Initial
release
Enjoy!
Any
questions, comments, suggestions, are welcome: