The MASM Forum Archive 2004 to 2012

General Forums => The Workshop => Topic started by: msmith on May 27, 2006, 06:55:38 AM

Title: DestroyMenu
Post by: msmith on May 27, 2006, 06:55:38 AM
When I use DestroyMenu, it returns a 1 (successful), but the menu stays and the dropdowns still work.

According to MSDN, it s supposed to destroy the menu whose handle is specified and recusively destroy all submenus.

If I do another  DestroyMenu after the first one, it returns a 0 (error) as it should, so the first  DestroyMenu is doing something. It is like it destroying the menu internally, but not on the display. (and the dropdowns still work)

I also tried an InvalidateRect on the window to no avail.
Title: Re: DestroyMenu
Post by: KSS on May 27, 2006, 08:03:52 PM
If you want good help always put example of your code.  :dazzled:
Because I can't understand you.
Title: Re: DestroyMenu
Post by: Ossa on May 27, 2006, 08:14:09 PM
Is the menu assigned to a window? I'm not sure that it would work in that case, as windows would be handling it then.

Ossa
Title: Re: DestroyMenu
Post by: msmith on May 27, 2006, 09:03:23 PM
Quote
Is the menu assigned to a window? I'm not sure that it would work in that case, as windows would be handling it then.

This is the key.

If I do an invoke Setmenu,[Hwnd],0 first, then it works fine.

Thanks,

Mike