Warning icon for 'validation error' MessageBox

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2309 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
joostverburg 2003-03-16 09:56:33 +00:00
parent 39135e4daa
commit 6241cec9a4
2 changed files with 2 additions and 2 deletions

View file

@ -287,14 +287,14 @@ bool ValidateFields() {
// May cause problems for the install script, but no memory is problems for us.
for (nIdx = 0; nIdx < nNumFields; nIdx++) {
// this if statement prevents a stupid bug where a min/max length is assigned to a label control
// where the user obviously has no way of changing what is displayed. (can you say, "infinite loop"?)
// where the user obviously has no way of changing what is displayed. (can you say, "infinite loop"?)
if (pFields[nIdx].nType >= FIELD_TEXT) {
nLength = SendMessage(pFields[nIdx].hwnd, WM_GETTEXTLENGTH, 0, 0);
if (((pFields[nIdx].nMaxLength > 0) && (nLength > pFields[nIdx].nMaxLength)) ||
((pFields[nIdx].nMinLength > 0) && (nLength < pFields[nIdx].nMinLength))) {
if (pFields[nIdx].pszValidateText) {
MessageBox(hConfigWindow, pFields[nIdx].pszValidateText, NULL, MB_OK);
MessageBox(hConfigWindow, pFields[nIdx].pszValidateText, NULL, MB_OK|MB_ICONWARNING);
}
SetFocus(pFields[nIdx].hwnd);
return false;

Binary file not shown.