vistaMenu mdi

I just came accross this control last night. I see that once I bring up a child with menus, my menus don't draw the icons anymore (using windows 7). Any work arounds for this?

I'm going to need a bit more information than that. Can I see your source, or maybe even a quick example that shows the problem? Send it to wyatt@wyday.com

I can't send source code, but I can tell you have to reproduce the issue.

Make a MDI container form with an image on the mainmenu. Create a child form also with a mainmenu with an image. If you load the MDI form, it will draw perfectly. If you add the child control. Neither of the menus will draw the images.

Ok, I can confirm this bug. But it appears there are other bugs with the MDI model & the Main Menu control. When a child window has a main menu the the parent window's menus are appended.

Is this the how MDI functions?

I believe so. I ended up using the idea of this control, but owner draw all menus and use UXtheme if it is enabled. Not the easiest solution, but it is not too bad.

I spoke too soon. My plan Works nice for win7, but (surprised me) xp I guess doesn't theme menus, just does color and font change. It also seems to mess up the icons when the menu is merged. I have to look further into it. Later.

Vista Menu is open source. If there's a bug, just step through the source and fix it. There's no need to re-write the whole drawing system from scratch.

But I'm inclined to think this is a bug in implementation of MDI. Is adding a child-form's main menu to the parent-form's menu expected behavior?

At any rate - you can fix this by changing the way Vista menu caches the menu item associated with the icon.

I agree that it is a bug in the way that main menus are merged. Dropping of icon in win7 sucks. However, ownerdrawing it worked. In XP, there is more of an issue. I am trying to find out what it is doing to try to make something that will work for all my projects. Something that I can just drop in and set indexes to an image list..Ya I know alpha is FUBAR, but it works pretty good for icons. I may try to figure out a better imagelist some day.