#Include "window9.bi"
#Include "XXControls.bi"
Dim As HMENU hMessages,MenName,MenName1,_
MenName2
Dim As Integer event
Dim As HIMAGELIST hImageList
Dim As HBITMAP hBmpImgList
Dim As HWND hwnd  = OpenWindow("",10,10,400,400)

hMessages=Create_Menu()
MenName=MenuTitle(hMessages,"Стиль XP")
MenName1=MenuTitle(hMessages,"Стиль XNET")
MenName2=MenuTitle(hMessages,"Стиль OFFICE_2000")
MenuItem(1,MenName,"1 меню")
MenuItem(2,MenName,"2 меню")
MenuItem(3,MenName1,"3 меню")
MenuItem(4,MenName1,"4 меню")
MenuItem(5,MenName2,"5 меню")
MenuItem(6,MenName2,"6 меню")

hImageList = ImageList_Create( 16, 16, ILC_COLOR or ILC_MASK, 14,0)
hBmpImgList = LoadBitmap(GetModuleHandle(0),Cast(LPCSTR, 101))
ImageList_AddMasked(hImageList, hBmpImgList,bgr( 192, 192, 192))
DeleteObject(hBmpImgList)
RedrawMenu(hwnd, MenName, STYLE_OFFICE_XP)
RedrawMenu(hwnd, MenName1, STYLE_XNET)
RedrawMenu(hwnd, MenName2, STYLE_OFFICE_2000)
SetMenuItemIcon(MenName, 1, ImageList_GetIcon(hImageList, 0, ILD_NORMAL))
SetMenuItemIcon(MenName, 2, ImageList_GetIcon(hImageList, 1, ILD_NORMAL))
SetMenuItemIcon(MenName1, 3, ImageList_GetIcon(hImageList, 2, ILD_NORMAL))
SetMenuItemIcon(MenName1, 4, ImageList_GetIcon(hImageList, 3, ILD_NORMAL))
SetMenuItemIcon(MenName2, 5, ImageList_GetIcon(hImageList, 4, ILD_NORMAL))
SetMenuItemIcon(MenName2, 6, ImageList_GetIcon(hImageList, 5, ILD_NORMAL))

Do
 event=WaitEvent
 If event=EventClose Then End
Loop

