CreateMenu() Flag replacement for CreateImageMenu()

Got an idea for enhancing PureBasic? New command(s) you'd like to see?
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

CreateMenu() Flag replacement for CreateImageMenu()

Post by nco2k »

how about having two commands instead of four and using flags instead?

Code: Select all

CreateMenu(#Menu, WindowID(#Win))
CreateMenu(#Menu, WindowID(#Win), #PB_Menu_Image)

CreatePopupMenu(#Menu)
CreatePopupMenu(#Menu, #PB_Menu_Image | #PB_Menu_ModernLook)
just an idea.

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Fred
Administrator
Administrator
Posts: 18162
Joined: Fri May 17, 2002 4:39 pm
Location: France
Contact:

Post by Fred »

It has been done like that because when using an image based menu, there is quite some code added to handle the ownerdraw stuff. Separating the command allow seperating the code when linking, and therefore reduce the executable size if you don't use image based menus.
User avatar
nco2k
Addict
Addict
Posts: 1344
Joined: Mon Sep 15, 2003 5:55 am

Post by nco2k »

yea, i thought that might be the reason. thanks for the explenation. :)

c ya,
nco2k
If OSVersion() = #PB_OS_Windows_ME : End : EndIf
Post Reply