Thread: Using MF_GRAYED

  1. #1
    Registered User
    Join Date
    May 2004
    Posts
    215

    Using MF_GRAYED

    Im using MF_GRAYED for my menu, but I dont know how to make it ungrayed. can someone help, thank you. :-)

  2. #2
    Registered User
    Join Date
    May 2004
    Posts
    215
    nevermind i got it, i guess my problem is, my commands dont work

  3. #3
    Registered User
    Join Date
    May 2004
    Posts
    215
    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.

  4. #4
    Registered User
    Join Date
    May 2004
    Posts
    215
    nevermind i got it :-)

Popular pages Recent additions subscribe to a feed