I am creating a dll that controls a dialog box. I like to get a certain area to have red text. This code compiles, but no effect is observed. Here is the area where the dialog is executed:
LRESULT CALLBACK DialogProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { switch(message) { case WM_INITDIALOG: CheckDlgButton(hDlg, IDC_CHECK, FALSE); EnableWindow(GetDlgItem(hDlg, IDOK), FALSE); return TRUE; case WM_COMMAND: switch (LOWORD(wParam)) { case IDC_CHECK: if (IsDlgButtonChecked(hDlg, IDC_CHECK)) { EnableWindow(GetDlgItem(hDlg, IDOK), TRUE); EnableWindow(GetDlgItem(hDlg, IDCANCEL), FALSE); } else { EnableWindow(GetDlgItem(hDlg, IDOK), FALSE); EnableWindow(GetDlgItem(hDlg, IDCANCEL), TRUE); } break; case IDOK: { EndDialog(hDlg, TRUE); return FALSE; } case IDCANCEL: { EndDialog(hDlg, FALSE); return FALSE; } case WM_CTLCOLORSTATIC:
source share