Ist es möglich, in ein PopupMenu ohne „MenuTitle“ ,beim SubMenu ein Bild einzufügen?
Danke im vorraus.

Code: Alles auswählen
EnableExplicit
Define EventID
;LoadImage(1,"...\Grafik.bmp",0)
CreateImage(1,16,16,32)
If OpenWindow(0,0,0,500,400,"Window",#PB_Window_SystemMenu|#PB_Window_ScreenCentered)
If CreatePopupMenu(1)
MenuItem(1,"Cut")
MenuItem(2,"Copy")
MenuItem(3,"Paste")
MenuBar()
OpenSubMenu("Options")
MenuItem(4,"Window...")
MenuItem(5,"Gadget...")
CloseSubMenu()
MenuBar()
MenuItem(6,"Test-Item")
EndIf
SetMenuItemBitmaps_(MenuID(1),4,#MF_BYPOSITION,ImageID(1),ImageID(1))
Repeat
EventID=WaitWindowEvent()
If GetAsyncKeyState_(#VK_RBUTTON)<>0
DisplayPopupMenu(1,WindowID(0))
EndIf
If EventID = #PB_Event_CloseWindow
End
EndIf
ForEver
EndIf
Code: Alles auswählen
...
ID = OpenSubMenu("Options")
SetMenuItemBitmaps_(MenuID(1),ID,#MF_BYCOMMAND,ImageID(1),ImageID(1))
...