Heres my code, my commands wont work:
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;
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.