Im Codearchiv gibt einen Quelltext , der dem Menu icons und textfarbe hinzufügt/ändert. Aller´dings bleibt der Menühintergrund gleich.
Kann mir vieleicht jemand sagen , wie das Callback aussehen muss,um das Menü komplett selber zu zeichnen?
Danke im Voraus!

Hier der Codearchiv Quelltext
Code: Alles auswählen
Procedure wcb(wnd, msg, wParam, lParam)
If msg = #WM_MEASUREITEM
hdc = GetDC_(wnd)
*lpmis.MEASUREITEMSTRUCT = lParam
*lmyitem.MyItem = *lpmis\itemData
GetTextExtentPoint32_(hdc,*lmyitem\Text,Len(*lmyitem\Text),@size.SIZE);
*lpmis\itemWidth = size\cx
*lpmis\itemHeight = size\cy
ReleaseDC_(wnd,hdc)
ProcedureReturn #True
ElseIf msg = #WM_DRAWITEM
*lpdis.DRAWITEMSTRUCT = lParam
*llmyitem.MyItem = *lpdis\itemData
dwCheckXY = GetMenuCheckMarkDimensions_()
wCheckX = (dwCheckXY >> 16 & $FFFF) + 10
nTextX = wCheckX + *lpdis\rcItem\left
nTextY = *lpdis\rcItem\top
If *lpdis\itemState & #ODS_SELECTED
If *lpdis\itemState & #ODS_DISABLED
SetTextColor_(*lpdis\hdc,RGB(128,128,128))
Else
SetTextColor_(*lpdis\hdc,RGB(255,255,255))
EndIf
SetBkColor_(*lpdis\hdc,SelBkColor)
*lpdis\rcItem\left = *lpdis\rcItem\left + nTextX -4
ExtTextOut_(*lpdis\hdc,nTextX,nTextY,#ETO_OPAQUE,*lpdis\rcItem,*llmyitem\Text,Len(*llmyitem\Text),0)
If *lpdis\itemState & #ODS_DISABLED
*lpdis\rcItem\left = *lpdis\rcItem\left - nTextX +4
DrawIconEx_(*lpdis\hdc,*lpdis\rcItem\left,*lpdis\rcItem\top,*llmyitem\hIcoo,16,15,0,GetClassLong_(wnd,#GCL_HBRBACKGROUND) ,3)
Else
*lpdis\rcItem\left = *lpdis\rcItem\left - nTextX +4
DrawIconEx_(*lpdis\hdc,*lpdis\rcItem\left,*lpdis\rcItem\top,*llmyitem\hIco,16,15,0,GetClassLong_(wnd,#GCL_HBRBACKGROUND),3)
EndIf
Else
*lpdis\rcItem\left = *lpdis\rcItem\left + nTextX -4
If *lpdis\itemState & #ODS_DISABLED
SetTextColor_(*lpdis\hdc,RGB(128,128,128))
Else
SetTextColor_(*lpdis\hdc,RGB(0,0,0))
EndIf
ExtTextOut_(*lpdis\hdc,nTextX,nTextY,#ETO_OPAQUE,*lpdis\rcItem,*llmyitem\Text,Len(*llmyitem\Text),0)
*lpdis\rcItem\left = *lpdis\rcItem\left - nTextX +4
DrawIconEx_(*lpdis\hdc,*lpdis\rcItem\left,*lpdis\rcItem\top,*llmyitem\hIcoo,16,15,0,GetClassLong_(wnd,#GCL_HBRBACKGROUND),3)
EndIf
SelectObject_(*lpdis\hdc,hOldFont)
ProcedureReturn #True
ElseIf msg = #WM_DESTROY
For i = 0 To 3
DeleteObject_(pmyitem(i)\hIco)
Next i
PostQuitMessage_(0)
Else
ProcedureReturn #PB_ProcessPureBasicEvents
EndIf
EndProcedure