ProGUI V1.13! User Interface Library

BlitzMax Forums/MaxGUI Module/ProGUI V1.13! User Interface Library

PrincieD(Posted 2010) [#1]






Hi Guys! I'm new to the forum (although not new to BlitzBasic ;) I used to code in BlitzBasic 2 on the Amiga! - good ol' days) and here is my product I bring with me :)

The examples show how ProGUI can be easily combined with MaxGUI components although it is just as easy using the native Windows API.
Anyway let me know what you think! :D

V1.13 : This is an intermediate release before the next major update is ready. Mainly bug fixes, huge optimizations and of course a new 64 bit version!! yay! :shock: :D

Please note ProGUI is licenseware and will timeout at around 5 minutes per session so that you can trial out ProGUI with your applications. A license for the standard version is only €30 (EUR) however! There is also a ProGUI Gold license which is slightly more expensive but Includes full source code of ProGUI and a license to use it in your own projects: €45 (EUR)

http://www.progui.co.uk

ProGUI Main Archive: Includes DLL version and Userlib version.

http://www.progui.co.uk/downloads/ProGUI.rar
http://www.progui.co.uk/downloads/ProGUI.zip

Mirror

http://chris.forgesoft.net/ProGUI.rar
http://chris.forgesoft.net/ProGUI.zip

Examples:

http://www.progui.co.uk/downloads/ProGUI_BlitzMax_Examples.rar
http://www.progui.co.uk/downloads/ProGUI_BlitzMax_Examples.zip

Mirror

http://chris.forgesoft.net/ProGUI_BlitzMax_Examples.rar
http://chris.forgesoft.net/ProGUI_BlitzMax_Examples.zip


Main Features

· Easy to use and simple API with commands such as "MenuTitleEx(title.s)"

· Easy Installation

· Extremely fast rendering with internal caching and intelligent double-buffering.

· The most accurate replica of Whidbey and Office 2003 styles that exist as well as improvements over Microsoft's engine such as flicker free menu tracking and superior menu scrolling!

· Windows 7, Vista and XP compatible.

· Unicode support.

. Full Source Code included in ProGUI Gold edition.

· Rebars! (IE Explorer style container control for toolbars), multiple rebars on multiple windows!

· Extended rebar functionality including new Office 2003 style, auto vertical resizing and user vertical resizing.

· Super smooth window resizing of components, no wild jumping or flickering!

· Option for automatic double buffering of rebars when resizing!

· Full Automatic Chevron support for rebars, see IE Explorer - resize the window too small and click on the chevron to see a popup menu with toolbar icons.

· Extended toolbars, full 32bit Alpha masked icon/image support of any size for toolbar buttons with separate images for normal, hot and disabled states. As many toolbars as you want on multiple windows!

· New Office 2003 Toolstrip style toolbars!

· Support for drop down buttons in toolbars, just pass a popup menu or extended popup menu to the command!

· Extended menus! Have cool "floating" menus contained in a rebar/container with ease! Full support for 32bit Alpha masked icons/images of any size in menus with support for different images for normal, hot and disabled states! Includes extended system menu and popup menu. Different styles of menus available for example: Office 2003 style menus, Office XP/Whidbey style menus, IE Explorer style, Classic/Mozilla Firefox Style and other styles. Automatic chevrons on menus when window resized too small! Automatic detection of system font change and resized accordingly. Full keyboard navigation and hot-key support. When menu goes off screen automatically fits inside screen (see Explorer for a bad implementation of this, see Firefox for a good implementation).

· Theme adaptive custom user defined colours for User Interface styles.

· No window callbacks!


Cheers!

Chris.

Last edited 2010

Last edited 2010

Last edited 2010

Last edited 2010

Last edited 2010


popcade(Posted 2010) [#2]
The post is too long, too hard for reading...


Htbaa(Posted 2010) [#3]
I'd say leave the history/changelog out of your announcement. At least for a first announcement like this one.

It looks quite nice though. Congrats on the release and good luck with it.


MikeHart(Posted 2010) [#4]
No go, windows only.


PrincieD(Posted 2010) [#5]
Htbaa thanks :) i've shortened the post now.


GaryV(Posted 2010) [#6]
I am hoping that you want honest feedback? Keep in mind the following is only my opinion:

This looks very nice. $42.00 is not unreasonable for something that looks so good. However mentioning a price increase later this year putting it at $56 is simply over priced given the product and its limitations.

Since this is aimed at BlitzMax it has a major shortcoming that will keep many from purchasing it: You do not mention a Linux or a Mac version. This isn't PureBasic where support for Macs is half-assed (at best). There is an extremely large percentage of BlitzMax users developing for the Mac (and keep in mind that BlitzMax actually debuted for the Mac first and other platforms were added later). The majority of BlitzMax users seem to release Windows and Mac versions of their apps/games, and there are many who also throw in a Linux version. Cross-platform capabilities are crucial for a BlitzMax add-on like this to succeed.

You also do not mention if the source is available. DLLs and Mods (closed) do not seem to be very useful to many looking for a GUI system for BlitzMax due to their closed nature. Remember that BlitzMax is an open source product. The GUI systems that actually sell and have a following (ifso/Fry) include the source.

You also do not mention whether it can use skins. You only mention "styles" of various apps, not skins of various operating systems. I looked at the screen shots on your site, but in all of the shots, you are trying to emulate the look of XP. Since this would look bizarre on a modern operating system, can you show us some screen shots under Windows 7 or using a Windows 7 skin if your product can use skins?

· 64 bit version!
This is of no benefit to BlitzMax users, so you probably should not mention it as a feature.


GaryV(Posted 2010) [#7]
ps. This was also posted in the wrong part of the forum (just a statement, not a complaint). This category is for the MaxGUI module discussions. This would have been better served posting it in "BlitzMax Programming" which is where the other third-party GUI systems usually get posted/announced.

Please consider adding your product to the toolbox section of the forums, so people can easily find it when looking for compatible tools. Forum posts tend to drop off very quickly and many good products get overlooked for not being listed in the Toolbox.


PrincieD(Posted 2010) [#8]
Hi GaryV thanks for the feedback. The $56 will reflect the feature base of the next big update i.e. dockable command bars and more.

Cheers

Chris.


GaryV(Posted 2010) [#9]
PrincieD: As to the price, keep in mind that no matter how many features you add, as your product stands now, it provides 1/3 of the functionality of competing third-party BlitzMax GUI systems due to the limitations on supported platforms (no Linux or OS X support).

Last edited 2010


PrincieD(Posted 2010) [#10]
GaryV: Yes that to a certain extent is true however it wouldn't be that much extra work for a programmer to modify the MaxGUI W32 subsystem to call/wrap ProGUI equivalent commands. The BlitzMax code examples are just a simple "rough and ready" flat API way of demonstrating how ProGUI can be quickly and easily used.


PrincieD(Posted 2010) [#11]
can you show us some screen shots under Windows 7 or using a Windows 7 skin if your product can use skins?


Heres a good one! http://installforge.net/gallery

Classic style menus and rebars/toolbars use the Windows7/Vista skin when rendered in that environment. Every colour of the Office2003/OfficeXP(Whidbey) styles can be customized for a blue shade of windows user theme setting, light-grey, green, dark-grey at present. Full skins will be coming later on.

Please take a look at the Command set at http://www.progui.co.uk/HTML/index.html in order to get a feel of what it can do for you. The API is designed to be very easy, no complex structures.

Thanks!

Chris.


ima747(Posted 2010) [#12]
Congrats on the release, looks great. I would like to mirror the above statements about Mac/Linux comparability. Cross platform is most of why I use blitzmax as much as I do, any tool that doesn't support windows and Mac (and preferably Linux but for me that's not as big a concern) sadly can't find room I my bag of tricks. If you could find a way to make this cross platform and preserve the native feel (even if it required tweks, or had a primary target os and then an "auto warp" secondary etc.) I could see it becoming a major tool for me...

Regardless of your future goals good luck, it looks great!


PrincieD(Posted 2010) [#13]
ima747: yes i can understand this entirely, i just wanted first initially to get rudimentary examples out, I will be working on a Blitz MaxGUI win32 subsystem soon soon :)


PrincieD(Posted 2010) [#14]
My long term goal is to be able not only to supply controls which would take too many months of development, but to supply controls/dialogues which can be used with any version of Windows (and retain the modern feel) , at the moment 1/4 of users are running Windows 7 or Vista that leaves a hell of a lot of users who are running 32 bit XP based systems (myself included!).


PrincieD(Posted 2010) [#15]
GaryV: if you want to compare the cross-platform support of BlitzMax with Purebasic (very good probably since the last time you checked) then consider BlitzMax Menuexample1.exe = 1,525,760 bytes, Purebasic = Menuexample1.exe = 28,672 bytes (and PureBasic has 64bit support). Again it's very simple to have a quality win32 user-interface by modifying that subsystem and yet have cross-platform compatibility, it's all about whether you want a quality interface on all platforms.

Last edited 2010


shinkiro1(Posted 2010) [#16]
When comparing the two you made use of Framework (using only modules which are neccesary)?

Btw nice system, however as others have mentioned, cross platform support is a very important feature to consider.


PrincieD(Posted 2010) [#17]
Thanks Espada! :)

Heres the BlitzMax source for Menuexample1.exe:

' Demonstrates how To use MenuEx's

Strict

Import "manifest.o"
Import MaxGui.Drivers
Include "ProGUI_BlitzMax.bmx"
StartProGUI("", 0, 0, 0, 0, 0, 0, 0)

' set up a structure for easy access to icon images
Type Images
	Field normal%
	Field hot%
	Field disabled%
End Type
' create and initialize an array of images for easy access to icon images
Global image:images[36]
For Local i:Int=0 To 35
	Local thisImage:Images=New Images
	image[i]=thisImage
Next

' define win32 externs needed for loading .ico icons
Extern "Win32"	
	Function LoadImage_:Int(hinst:Int, lpszName$w, uType:Int, cxDesired:Int, cyDesired:Int, fuLoad:Int) = "LoadImageW@24"
	Function GetModuleHandle:Int(lpModuleName:Int) = "GetModuleHandleA@4"
EndExtern

' Load in some example icons.
' A more efficient way to load your icon images is to have them
' stored in your exe's resource, in order to load them use the following line:
' image = LoadImage_(GetModuleHandle(0), "name of icon in resource", IMAGE_ICON, 16, 16, 0)
' Doing this allows you to choose the size of icon stored in the ICO file too.
' If you prefer you can also pass a Pixmap(PNG/JPG) as bitmap to any ProGUI image parameter by using the handle returned by:
' TWindowsGraphic.BitmapFromPixmap(TPixmap)
image[0].normal = LoadImage_(GetModuleHandle(0), "icons\cut.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
image[0].hot = LoadImage_(GetModuleHandle(0), "icons\cut_h.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
image[0].disabled = LoadImage_(GetModuleHandle(0), "icons\cut_d.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)

image[1].normal = LoadImage_(GetModuleHandle(0), "icons\paste.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
image[1].hot = LoadImage_(GetModuleHandle(0), "icons\paste_h.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
image[1].disabled = LoadImage_(GetModuleHandle(0), "icons\paste_d.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)

image[2].normal = LoadImage_(GetModuleHandle(0), "icons\image.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
image[2].hot = LoadImage_(GetModuleHandle(0), "icons\image_h.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
image[2].disabled = LoadImage_(GetModuleHandle(0), "icons\image_d.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)

image[3].normal = LoadImage_(GetModuleHandle(0), "icons\multimedia.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
image[3].hot = LoadImage_(GetModuleHandle(0), "icons\multimedia_h.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
image[3].disabled = LoadImage_(GetModuleHandle(0), "icons\multimedia_d.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)

image[4].normal = LoadImage_(GetModuleHandle(0), "icons\package.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
image[4].hot = LoadImage_(GetModuleHandle(0), "icons\package_h.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
image[4].disabled = LoadImage_(GetModuleHandle(0), "icons\package_d.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)

image[5].normal = LoadImage_(GetModuleHandle(0), "icons\preferences.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
image[5].hot = LoadImage_(GetModuleHandle(0), "icons\preferences_h.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
image[5].disabled = LoadImage_(GetModuleHandle(0), "icons\preferences_d.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)

image[6].normal = LoadImage_(GetModuleHandle(0), "icons\jump.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
image[6].hot = LoadImage_(GetModuleHandle(0), "icons\jump_h.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)
image[6].disabled = LoadImage_(GetModuleHandle(0), "icons\jump_d.ico", IMAGE_ICON, 16, 16, LR_LOADFROMFILE)

image[19].normal = LoadImage_(GetModuleHandle(0), "icons\copy doc.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE)
image[19].hot = LoadImage_(GetModuleHandle(0), "icons\copy doc_h.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE)
image[19].disabled = LoadImage_(GetModuleHandle(0), "icons\copy doc_d.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE)

image[20].normal = LoadImage_(GetModuleHandle(0), "icons\computer on.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE)
image[20].hot = LoadImage_(GetModuleHandle(0), "icons\computer on_h.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE)
image[20].disabled = LoadImage_(GetModuleHandle(0), "icons\computer on_d.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE)

image[21].normal = LoadImage_(GetModuleHandle(0), "icons\search.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE)
image[21].hot = LoadImage_(GetModuleHandle(0), "icons\search_h.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE)
image[21].disabled = LoadImage_(GetModuleHandle(0), "icons\search_d.ico", IMAGE_ICON, 32, 32, LR_LOADFROMFILE)

Extern "Win32"	
	Function SetWindowLong:Int(HWND:Int,nIndex:Int,dwNewLong:Int) = "SetWindowLongA@12"
	Function GetWindowLong:Int(HWND:Int,nIndex:Int) = "GetWindowLongA@8"	
	Function CallWindowProc:Int(prevwndproc:Int, hwnd:Int, msg:Int, wparam:Int, lparam:Int) = "CallWindowProcA@20"
EndExtern

' Sets a Window's callback function
Function SetWindowFunc:Int(window:TGadget, newfunc:Int( hwnd:Int, msg:Int, wparam:Int, lparam:Int))
	Local hwnd:Int = QueryGadget(window, QUERY_HWND_CLIENT)
	Local oldfunc:Int = GetWindowLong(hwnd, GWL_WNDPROC)
	SetWindowLong(hwnd, GWL_WNDPROC, Int(Byte Ptr newfunc))
	Return oldfunc
EndFunction

' This function allows you to capture all ProGUI Windows WM_MESSAGE events
Function WindowFunc:Int( hwnd:Int, msg:Int, wparam:Int, lparam:Int) "Win32"
	
	Select msg
		' Capture menu item click
		Case WM_COMMAND
			Print wparam ' display selected menu item's ID
		
		' this MUST be handled, otherwise MaxGUI freezes on window close.
		Case WM_DESTROY
			SetWindowLong(hwnd, GWL_WNDPROC, OldWindowFunc)
	EndSelect
	
	Return CallWindowProc(OldWindowFunc, hwnd, msg, wparam, Int(lparam))
EndFunction

' creates a window and sets its windows event callback function to our new one in order to capture ProGUI WM_MESSAGES
Local window:TGadget = CreateWindow("MenuExample 1: A single menu attached to the main window",50,50,800,500, Null, WINDOW_TITLEBAR | WINDOW_RESIZABLE | WINDOW_CLIENTCOORDS)
Global OldWindowFunc:Int = SetWindowFunc(window, WindowFunc)

'Create sub menu
CreatePopupMenuEx(1, UISTYLE_WHIDBEY)
MenuItemEx(0, "Hello im a submenu!", image[6].normal, image[6].hot, image[6].disabled, 0)

'Create Main menu
CreateMenuEx(0, QueryGadget(window, QUERY_HWND_CLIENT), UISTYLE_WHIDBEY)
MenuTitleEx("&This is a test!")
MenuItemEx(1, "&Cool huh!$\bCtrl+C", image[0].normal, image[0].hot, image[0].disabled, 0)
MenuItemEx(2, "&Disabled version", image[0].normal, image[0].hot, image[0].disabled, 0)
DisableMenuItemEx(0, 2, 1)
MenuTitleEx("&Another")
MenuItemEx(3, "&Icons are pretty", image[1].normal, image[1].hot, image[1].disabled, MenuExID(1))
MenuItemEx(4, "&So is this one$\bCtrl+S", image[2].normal, image[2].hot, image[2].disabled, 0)
MenuItemEx(11, "I don't h&ave an icon?", 0, 0, 0, 0)
MenuBarEx()
MenuItemEx(5, "&\i\c0000a0Bonjour!\n$\bCtrl+B", image[3].normal, image[3].hot, image[3].disabled, 0)
MenuTitleEx("&Weee!")
MenuItemEx(6, "&Yo d00d!", image[4].normal, image[4].hot, image[4].disabled, 0)
MenuItemEx(7, "&Hello", image[5].normal, image[5].hot, image[5].disabled, 0)
SetMenuExImageSize(32, 32)
MenuTitleEx("&Really big!")
MenuItemEx(8, "&Wow!", image[19].normal, image[19].hot, image[19].disabled, 0)
MenuItemEx(9, "&Big!$\bCtrl+B", image[20].normal, image[20].hot, image[20].disabled, 0)
MenuItemEx(10, "&Icons!", image[21].normal, image[21].hot, image[21].disabled, 0)

' Main event loop, capture all BlitzMax events here as normal
While True
   WaitEvent 
   Print CurrentEvent.ToString()
   Select EventID()
   	Case EVENT_WINDOWCLOSE
   		End
   End Select
Wend


and heres the PureBasic source for Menuexample1.exe:

; Remember to enable XP Skin Support!
; Demonstrates how to use MenuEx's

IncludeFile "ProGUI_PB.pb" ; comment this line out when using the UserLibrary version
StartProGUI("", 0, 0, 0, 0, 0, 0, 0)


;- Window Constants
Enumeration
  #Window_0
EndEnumeration

;- Gadget Constants
Enumeration
  #MENU_0
  #MENU_1
EndEnumeration


; set up structure for easy access to icon images
Structure images
  normal.i
  hot.i
  disabled.i
EndStructure
Global Dim image.images(36)

; load in some example icons
; a more efficient way to load your icon images is to have them
; stored in your exe's resource, in order to load them use the following line:
; image = LoadImage_(GetModuleHandle_(0), "name of icon in resource", #IMAGE_ICON, 16, 16, 0)
; doing this allows you to choose the size of icon stored in the ico file too.
image(0)\normal = LoadImage_(GetModuleHandle_(0), "icons\cut.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(0)\hot = LoadImage_(GetModuleHandle_(0), "icons\cut_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(0)\disabled = LoadImage_(GetModuleHandle_(0), "icons\cut_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(1)\normal = LoadImage_(GetModuleHandle_(0), "icons\paste.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(1)\hot = LoadImage_(GetModuleHandle_(0), "icons\paste_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(1)\disabled = LoadImage_(GetModuleHandle_(0), "icons\paste_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(2)\normal = LoadImage_(GetModuleHandle_(0), "icons\image.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(2)\hot = LoadImage_(GetModuleHandle_(0), "icons\image_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(2)\disabled = LoadImage_(GetModuleHandle_(0), "icons\image_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(3)\normal = LoadImage_(GetModuleHandle_(0), "icons\multimedia.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(3)\hot = LoadImage_(GetModuleHandle_(0), "icons\multimedia_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(3)\disabled = LoadImage_(GetModuleHandle_(0), "icons\multimedia_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(4)\normal = LoadImage_(GetModuleHandle_(0), "icons\package.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(4)\hot = LoadImage_(GetModuleHandle_(0), "icons\package_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(4)\disabled = LoadImage_(GetModuleHandle_(0), "icons\package_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(5)\normal = LoadImage_(GetModuleHandle_(0), "icons\preferences.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(5)\hot = LoadImage_(GetModuleHandle_(0), "icons\preferences_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(5)\disabled = LoadImage_(GetModuleHandle_(0), "icons\preferences_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(6)\normal = LoadImage_(GetModuleHandle_(0), "icons\jump.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(6)\hot = LoadImage_(GetModuleHandle_(0), "icons\jump_h.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)
image(6)\disabled = LoadImage_(GetModuleHandle_(0), "icons\jump_d.ico", #IMAGE_ICON, 16, 16, #LR_LOADFROMFILE)

image(19)\normal = LoadImage_(GetModuleHandle_(0), "icons\copy doc.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(19)\hot = LoadImage_(GetModuleHandle_(0), "icons\copy doc_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(19)\disabled = LoadImage_(GetModuleHandle_(0), "icons\copy doc_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(20)\normal = LoadImage_(GetModuleHandle_(0), "icons\computer on.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(20)\hot = LoadImage_(GetModuleHandle_(0), "icons\computer on_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(20)\disabled = LoadImage_(GetModuleHandle_(0), "icons\computer on_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

image(21)\normal = LoadImage_(GetModuleHandle_(0), "icons\search.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(21)\hot = LoadImage_(GetModuleHandle_(0), "icons\search_h.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)
image(21)\disabled = LoadImage_(GetModuleHandle_(0), "icons\search_d.ico", #IMAGE_ICON, 32, 32, #LR_LOADFROMFILE)

; creates a window
Procedure Open_Window_0()
  
  OpenWindow(#Window_0, 50, 50, 800, 500, "MenuExample 1: A single menu attached to the main window", #PB_Window_ScreenCentered | #PB_Window_SizeGadget | #PB_Window_MinimizeGadget | #PB_Window_MaximizeGadget | #PB_Window_Invisible)
  
  ; sub menu
  CreatePopupMenuEx(#MENU_1, #UISTYLE_WHIDBEY)
  MenuItemEx(0, "Hello im a submenu!", image(6)\normal, image(6)\hot, image(6)\disabled, 0)
  
  ; main menu
  CreateMenuEx(#MENU_0, WindowID(#Window_0), #UISTYLE_WHIDBEY)
  MenuTitleEx("&This is a test!")
  MenuItemEx(1, "&Cool huh!$\bCtrl+C", image(0)\normal, image(0)\hot, image(0)\disabled, 0)
  MenuItemEx(2, "&Disabled version", image(0)\normal, image(0)\hot, image(0)\disabled, 0)
  DisableMenuItemEx(#MENU_0, 2, 1)
  MenuTitleEx("&Another")
  MenuItemEx(3, "&Icons are pretty", image(1)\normal, image(1)\hot, image(1)\disabled, MenuExID(#MENU_1))
  MenuItemEx(4, "&So is this one$\bCtrl+S", image(2)\normal, image(2)\hot, image(2)\disabled, 0)
  MenuItemEx(11, "I don't h&ave an icon?", 0, 0, 0, 0)
  MenuBarEx()
  MenuItemEx(5, "&\i\c0000a0Bonjour!\n$\bCtrl+B", image(3)\normal, image(3)\hot, image(3)\disabled, 0)
  MenuTitleEx("&Weee!")
  MenuItemEx(6, "&Yo d00d!", image(4)\normal, image(4)\hot, image(4)\disabled, 0)
  MenuItemEx(7, "&Hello", image(5)\normal, image(5)\hot, image(5)\disabled, 0)
  SetMenuExImageSize(32, 32)
  MenuTitleEx("&Really big!")
  MenuItemEx(8, "&Wow!", image(19)\normal, image(19)\hot, image(19)\disabled, 0)
  MenuItemEx(9, "&Big!$\bCtrl+B", image(20)\normal, image(20)\hot, image(20)\disabled, 0)
  MenuItemEx(10, "&Icons!", image(21)\normal, image(21)\hot, image(21)\disabled, 0)
  
EndProcedure



Open_Window_0() ; create window
HideWindow(0, 0)  ; show our newly created window

; enter main event loop
Repeat
  
  
  Event = WaitWindowEvent()
  window = EventWindow()
  
  If Event = #PB_Event_Menu
    MenuID = EventMenu()
    Debug MenuID
  EndIf
  
  
Until Event = #WM_CLOSE



PrincieD(Posted 2010) [#18]
GaryV: You also do not mention if the source is available. DLLs and Mods (closed) do not seem to be very useful to many looking for a GUI system for BlitzMax due to their closed nature. Remember that BlitzMax is an open source product. The GUI systems that actually sell and have a following (ifso/Fry) include the source.


ProGUI Gold with full source code! is now available to purchase

http://www.progui.co.uk/register.html

See top of thread!

Cheers!

Chris

Last edited 2010


JoshK(Posted 2011) [#19]
Wow, this is great. You should consider making a MaxGUI driver so we can just drop it into our projects.


Takis76(Posted 2012) [#20]
This is very interesting.

Can be used with MaxGui?


SystemError51(Posted 2012) [#21]
From opening post:

The examples show how ProGUI can be easily combined with MaxGUI components although it is just as easy using the native Windows API.