| || |
menu_get_item_num not giving correct results
In my application i need to check if a menu item exists or not so i used this peice of code to check it.
a)As per TSL help, for menu_get_item_num fucntion outnum gets "0" if we the given menu item doesnt exist in the given menu.
b)But if the given menu item is the very first one in the given menu, then also the outnum is having "0".
Considering both the cases, one is the failure case and the other is the sucess case. But there is no way to differntiate both of them.
Can anyone give any inputs to solve this problem.
I want to use only "menu_get_item_num" but not "menu_get_item" function.Let me know if its possible.
I am using WR 7.0 with Win2K as OS, my AUT is a VB app.
[ 06-07-2004, 09:41 PM: Message edited by: value_qa ]
Re: menu_get_item_num not giving correct results
I'd guess that menu_get_item_num returns an error code (maybe E_ITEM_NOT_FOUND) if the item does not exist and returns E_OK if the item does exist.
rc = menu_get_item_num("mnuReports", "mnu25DayReport", outnum);
Check if rc == E_OK or not ...