Im using MF_GRAYED for my menu, but I dont know how to make it ungrayed. can someone help, thank you. :-)
Printable View
Im using MF_GRAYED for my menu, but I dont know how to make it ungrayed. can someone help, thank you. :-)
nevermind i got it, i guess my problem is, my commands dont work
Heres my code, my commands wont work:
however, nothing works. connect is set to disabled since we connect first, so disconnect is enabled. but when i click disconnect, nothing happens, everything stays the same when in reality disconnect should then become disabled and connect enabled.Code:
case ID_FILE_CONNECT:
EnableMenuItem(hMenu,ID_FILE_CONNECT,MF_DISABLED);
EnableMenuItem(hMenu,ID_FILE_CONNECT,MF_GRAYED);
EnableMenuItem(hMenu,ID_FILE_DISCONNECT,MF_ENABLED);
break;
case ID_FILE_DISCONNECT:
EnableMenuItem(hMenu,ID_FILE_DISCONNECT,MF_DISABLED);
EnableMenuItem(hMenu,ID_FILE_DISCONNECT,MF_GRAYED);
EnableMenuItem(hMenu,ID_FILE_CONNECT,MF_ENABLED);
break;
nevermind i got it :-)