There are two combobox cells and I need them to be Read Only.
I do ES_READONLY , but you can still enter values in them. I do not know why it does not work.
hStartVertexCombo = CreateWindow(L"Combobox", NULL, WS_CHILD | WS_VISIBLE | CBS_DROPDOWN | ES_READONLY, 97, 70, 120, 110, hWnd, NULL, hInst, NULL); hEndVertexCombo = CreateWindow(L"Combobox", NULL, WS_CHILD | WS_VISIBLE | CBS_DROPDOWN | ES_READONLY, 307, 70, 120, 110, hWnd, NULL, hInst, NULL); Further, I need the Find Path button to become active when I select something in the BOTH Combobox, and now it becomes active right after I select in one.
How can this be fixed?
if (HIWORD(wParam) == BN_CLICKED) { SendMessage(hStartVertexCombo, CBS_DROPDOWNLIST, (WPARAM)TRUE, 0); SendMessage(hEndVertexCombo, CBS_DROPDOWNLIST, (WPARAM)TRUE, 0); return; } else if (HIWORD(wParam) == CBN_SELCHANGE) { EnableWindow(hFindPathButton, 1); } UPD:
if ((startIndex == CB_ERR) || (endIndex == CB_ERR)) { SetWindowText(hFilePathEdit, L"Error"); return; }