+ IO works with new SetStaticBkColor
+ IO doesn't crash when a label has empty text + LangStrings now really start as "" when not defined git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2055 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
parent
ac449dae62
commit
dba09fcf5e
4 changed files with 17 additions and 19 deletions
|
@ -542,7 +542,7 @@ bool ReadSettings(void) {
|
|||
pFields[nIdx].nFlags |= LookupToken(FlagTable, szResult);
|
||||
|
||||
pFields[nIdx].pszText = myGetProfileStringDup(szField, "TEXT");
|
||||
if (pFields[nIdx].nType == FIELD_LABEL) {
|
||||
if (pFields[nIdx].nType == FIELD_LABEL && pFields[nIdx].pszText) {
|
||||
char *p1, *p2;
|
||||
for (p1=p2=pFields[nIdx].pszText; *p1; p1++, p2++) {
|
||||
if (*p1 == '\\') {
|
||||
|
@ -722,14 +722,7 @@ BOOL CALLBACK cfgDlgProc(HWND hwndDlg,
|
|||
break;
|
||||
case WM_CTLCOLORSTATIC:
|
||||
case WM_CTLCOLORDLG:
|
||||
{
|
||||
COLORREF color = GetWindowLong((HWND)lParam, GWL_USERDATA);
|
||||
if (color) {
|
||||
LOGBRUSH b={BS_SOLID, color-1, 0};
|
||||
SetBkColor((HDC)wParam, b.lbColor);
|
||||
return (BOOL)CreateBrushIndirect(&b);
|
||||
}
|
||||
}
|
||||
return (BOOL)GetWindowLong((HWND)lParam, GWL_USERDATA);
|
||||
}
|
||||
return 0;
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue