Does anybody know how to create a PopUp menu with a vertical bitmap (banner), just like the Start Menu? Is there a single API function available to do this or must we work hard for a such simple-looking thing?
you probaly have to do a owner-draw menu and paint the bitmap on there, look it up in the winapi reference
There are undocumented functions that draw the Windows start menu. However, I would suggest that you go with Kody's suggestion and create an owner-draw menu. Then just bitblt the vertical bitmap into place.
I am trying, but it doesn't work. Look at the following snippet of code I wrote as a response to the WM_MEASUREITEM and WM_DRAWITEM messages: .ELSEIF uMsg==WM_MEASUREITEM mov edx,lParam assume edx: ptr MEASUREITEMSTRUCT mov .itemID,ID_BAR mov .itemHeight,100 mov .itemWidth,20 assume edx: nothing .ELSEIF uMsg==WM_DRAWITEM mov edx,lParam assume edx: ptr DRAWITEMSTRUCT invoke CreateCompatibleDC,NULL mov hMemDC,eax invoke LoadBitmap,hInstance,BMP_ID mov hBmp,eax invoke SelectObject,hMemDC,hBmp invoke BitBlt,.hdc,0,0,20,100,hMemDC,0,0,SRCCOPY invoke DeleteDC,hMemDC invoke DeleteObject,hBmp assume edx: nothing The processing of the WM_MEASUREITEM message is OK, so the vertical bar is created and it is 20 pixels wide and 100 pixels high, but when the WM_DRAWITEM message is sent the expected bitmap isn't shown.