I have absolutely no clue why the following code works except for the following three characters: ç, à and è. It should rule out all non-digit characters from being written into an edit control. Because it let's those three pass trough I am forced to turn this:
if(!isdigit(editControl_Content[2]))
into this:
if(editControl_Content[2] == 'è' | editControl_Content[2] == 'ç' | editControl_Content[2] == 'à' | !isdigit(editControl_Content[2]))
This is the complete code:
char editControl_Content[2];
GetWindowText(GetDlgItem(hwnd, LOWORD(wParam)), &editControl_Content[2], 2);
if(editControl_Content[2] == 'è' | editControl_Content[2] == 'ç' | editControl_Content[2] == 'à' | !isdigit(editControl_Content[2])) {
SetWindowText(GetDlgItem(hwnd, LOWORD(wParam)), NULL);
}
else if(lockOn == false) {
SetFocus(GetDlgItem(hwnd, LOWORD(wParam)+1));
}
Any help would be very well appreciated.
Thank you.