Page 1 of 1

CreateMenu() Flag replacement for CreateImageMenu()

Posted: Sat Aug 15, 2009 6:24 pm
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

Posted: Sat Aug 15, 2009 6:37 pm
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.

Posted: Sat Aug 15, 2009 6:46 pm
by nco2k
yea, i thought that might be the reason. thanks for the explenation. :)

c ya,
nco2k