I haven't looked at the code for a while but I seemed to recall only drawing the command items rather than all aspects of the menus etc. This is something which I should rectify, but the truth is that I no longer use this code etc. I use an external menu library instead.
If you wish to ownerdraw the separators then you'll need to change the line :
Code: Select all
ModifyMenu_(GetMenu_(hWnd),item,#MF_BYCOMMAND|#MF_OWNERDRAW,item,icon)
to
Code: Select all
ModifyMenu_(GetMenu_(hWnd),item,#MF_BYREFERENCE|#MF_OWNERDRAW,item,icon)
and then make sure that for each menu item, the 'item' value passed to the AddMenuIcon() function is the positional index and the command index etc. (See the api guide for an explanation of this).
Once this is done you will receive #WM_MEASUREITEM and #WM_DRAWITEM messages for separators as well as comand items etc.
I may look like a mule, but I'm not a complete ass.