pub unsafe fn menu_index_in_parent(parent: HMENU, menu: HMENU) -> UINT {
    use winapi::um::winuser::{GetMenuItemCount, GetSubMenu};

    let children_count = GetMenuItemCount(parent);
    let mut sub_menu: HMENU;

    for i in 0..children_count {
        sub_menu = GetSubMenu(parent, i as i32);
        if sub_menu.is_null() { continue; }
        else if sub_menu == menu { return i as UINT; }
    }

    panic!("Menu/MenuItem not found in parent!")
}
/**
    Return the index of a children menu/menuitem in a parent menu.
    Panic if the menu is not found in the parent.
*/
Return the index of a children menu/menuitem in a parent menu.
Panic if the menu is not found in the parent.
Return the index of a children menu / menuitem in a parent menu . Panic if the menu is not found in the parent .
pub unsafe fn menu_index_in_parent(parent: HMENU, menu: HMENU) -> UINT {
    use winapi::um::winuser::{GetMenuItemCount, GetSubMenu};
    let children_count = GetMenuItemCount(parent);
    let mut sub_menu: HMENU;
    for i in 0..children_count {
        sub_menu = GetSubMenu(parent, i as i32);
        if sub_menu.is_null() { continue; }
        else if sub_menu == menu { return i as UINT; }
    }
    panic!("Menu/MenuItem not found in parent!")
}
pub unsafe fn menu_index_in_parent ( parent : HMENU , menu : HMENU ) -> UINT { use winapi :: um :: winuser :: { GetMenuItemCount , GetSubMenu } ; let children_count = GetMenuItemCount ( parent ) ; let mut sub_menu : HMENU ; for i in 0 .. children_count { sub_menu = GetSubMenu ( parent , i as i32 ) ; if sub_menu . is_null ( ) { continue ; } else if sub_menu == menu { return i as UINT ; } } panic ! ( " " ) }
Return the index of a children menu/menuitem in a parent menu.
Return the index of a children menu / menuitem in a parent menu .
parent
HMENU
menu
HMENU