As I am working in Win32
, I want to display a message using SetDlgItemText
. The message should vary its color depending on success or failure (say for example green for success, red for failure).
The code for the function:
if
{
//if user does not enter a key
SetDlgItemText(hDlg, ID_RESULT, L"Please enter a key");
return false;
}
else
{
SetDlgItemText(hDlg, ID_RESULT, L"Please enter all the user information");
return false;
}
In the above code "Please enter a key" and "Please enter all the user information" should be in red color indicating failure. We set default as green for ID_RESULT
. Is it possible to change color using SetTextColor
function in the IF condition itself or else give some other options