
public static void RemoveWindowMenu(IntPtr h)
{
IntPtr HMENU = GetMenu(h);
int count = GetMenuItemCount(HMENU);
for (int i = 0; i < count; i++)
RemoveMenu(HMENU, 0, (MF_BYPOSITION | MF_REMOVE));
}