pub fn enum_menus(&self) -> io::Result<BTreeSet<u32>> {
        // Get the window's main menu
        let menu = unsafe { GetMenu(self.hwnd) };
        if menu == 0 {
            // GetMenu() error
            return Err(io::Error::last_os_error());
        }

        // Create the empty hash set
        let mut menu_ids = BTreeSet::new();

        // Recursively search through the menu
        self.recurse_menu(&mut menu_ids, menu)?;

        Ok(menu_ids)
    }
/// Enumerate all window menus, return a set of the menu IDs which can
/// be used with a `WM_COMMAND` message
Enumerate all window menus, return a set of the menu IDs which can
be used with a `WM_COMMAND` message
Enumerate all window menus return a set of the menu IDs which can be used with a ` WM_COMMAND ` message
pub fn enum_menus(&self) -> io::Result<BTreeSet<u32>> {
        // Get the window's main menu
        let menu = unsafe { GetMenu(self.hwnd) };
        if menu == 0 {
            // GetMenu() error
            return Err(io::Error::last_os_error());
        }
        // Create the empty hash set
        let mut menu_ids = BTreeSet::new();
        // Recursively search through the menu
        self.recurse_menu(&mut menu_ids, menu)?;
        Ok(menu_ids)
    }
pub fn enum_menus ( & self ) -> io :: Result < BTreeSet < u32 > > { // Get the window's main menu let menu = unsafe { GetMenu ( self . hwnd ) } ; if menu == 0 { // GetMenu() error return Err ( io :: Error :: last_os_error ( ) ) ; } // Create the empty hash set let mut menu_ids = BTreeSet :: new ( ) ; // Recursively search through the menu self . recurse_menu ( & mut menu_ids , menu ) ? ; Ok ( menu_ids ) }
Enumerate all window menus, return a set of the menu IDs which can
be used with a `WM_COMMAND` message
Enumerate all window menus return a set of the menu IDs which can be used with a ` WM_COMMAND ` message
&self
&self