Click here to Skip to main content
14,869,990 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
i did following in mainframe.cpp & in normal code but it is crashing


C++
CMenu *mmenu = GetMenu();
mmenu->EnableMenuItem(IDRMENUNAME,MF_BYPOSITION | MF_DISABLED | MF_GRAYED);
Posted
Updated 26-Aug-14 0:35am
v4

1 solution

You are using the menu item id IDRMENUNAME with MF_BYPOSITION which probably means that the index is out of range. You also fail to check that GetMenu returns a valid pointer.
   

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)




CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900