
thanks
Fred

Code: Select all
#MIM_BACKGROUND = 2
Structure myMENUINFO
cbSize.l
fMask.l
dwStyle.l
cyMax.l
hbrBack.l
dwContextHelpId.l
dwMenuData.l
EndStructure
hMenuBrushBG = CreateSolidBrush_(RGB(255, 255, 100))
With mi.myMENUINFO
\cbSize = SizeOf(myMENUINFO)
\fMask = #MIM_BACKGROUND
\hbrBack = hMenuBrushBG
EndWith
If OpenWindow(0, 10, 10, 300, 200, "", #PB_Window_ScreenCentered | #PB_Window_SystemMenu)
hMenu = CreateMenu(0, WindowID(0))
MenuTitle("File")
MenuItem(1, "Open")
MenuItem(2, "Save")
MenuItem(3, "Close")
MenuTitle("Edit")
MenuItem(4, "Cut")
MenuItem(5, "Copy")
SetMenuInfo_(hMenu, mi)
DrawMenuBar_(WindowID(0))
Repeat
Event = WaitWindowEvent()
Until Event = #PB_Event_CloseWindow
DeleteObject_(hMenuBrushBG)
EndIf
End
The happiness is a road...
Use API functions CreateSolidBrush, FillRect, DeleteObjecti do some test on owner draw menu and i can't paint the rest of menubar, i can paint only "items", any idea
