The dialog displays a listing of virtual directories found on the target machine in the combo box. From here the user can select from the list of existing virtual directories or type in a new virtual directory name. To further complicate things, I have a text field and a browse button on the dialog as well. The text field will display the physical directory location of the already existing virtual directory selected from the combo box. The browse button will be disabled if an already exisiting virtual directory is selected, but will enable if the user chooses to type in a new virtual directory name.
Here is the problem I am having. I have no trouble with the existing virtual directories or displaying their corresponding physical directories correctly, but if I type in a new virtual directory the combo box is not properly recognizing the text as having changed and thus is taking no actions. How can I trap so that when the combo box has text typed into it the browse button will be enabled?
here is a code snipet. Case IDC_VIRT_DIR_LIST is the section where I am trying to check for changes to the combo box. Like I mentioned above it works for selections in the list, but not for typed in text.
nCmdValue = WaitOnDialog (szDialog);
switch ( nCmdValue )
case DLG_INIT:
**(perform initialization logic)**
case DLG_ERR:
**(perform error logic)**
case IDOK:
**(perform OK button logic)**
case SD_PBUT_BACK:
**(perform back button logic)**
case IDCANCEL:
**(perform cancel button logic)**
case DLG_CLOSE:
**(perform close button logic)**
case IDC_VIRT_DIR_LIST:
nResult = CtrlGetSubCommand (szDialog);
if (nResult = EDITBOX_CHANGE) then
**(enable browse button and such here)**
endif;
case IDC_BROWSE:
**(perform browse button logic)** endswitch;
Any help would be greatly appreciated...