diff --git a/Contrib/nsDialogs/Readme.html b/Contrib/nsDialogs/Readme.html index 0dabfb81..3077f0a4 100644 --- a/Contrib/nsDialogs/Readme.html +++ b/Contrib/nsDialogs/Readme.html @@ -9,6 +9,7 @@ b { color: red; } code { margin-left: 1.2em; padding: 0.5em; background-color: #f0f0f0; } span.inlcod i { padding: 0px 0.2em; color: #222222; font-family: monospace; font-style: normal; } blockquote pre { background-color: #fcfcfc; font-family: monospace; } +abbr { font-variant: none; cursor: help; } @@ -550,7 +551,7 @@ SectionEnd
  • ${NSD_CreateVTrackBar}
  • ${NSD_CreateUpDown}
  • ${NSD_CreateHotKey}
  • -
  • ${NSD_CreateIPAddress} (Requires IE4)
  • +
  • ${NSD_CreateIPAddress} (Requires IE4)
  • Returns the new control's HWND on the stack or error

    diff --git a/Contrib/nsDialogs/nsDialogs.nsh b/Contrib/nsDialogs/nsDialogs.nsh index 0d8e679e..2bf426bd 100644 --- a/Contrib/nsDialogs/nsDialogs.nsh +++ b/Contrib/nsDialogs/nsDialogs.nsh @@ -533,6 +533,7 @@ IntOp ${RET} ${RET} & ${BIT} ### RichEdit ### + !define NSD_RichEd_SetTextLimit `${__NSD_MkCtlCmd_LP} EM_EXLIMITTEXT 0 ` !define NSD_RichEd_GetEventMask `${__NSD_MkCtlCmd_RV} EM_GETEVENTMASK 0 0 ` !define NSD_RichEd_SetEventMask `${__NSD_MkCtlCmd_LP} EM_SETEVENTMASK 0 ` ; LP:ENM_* diff --git a/Source/BinInterop.cpp b/Source/BinInterop.cpp index b2001d41..d5beefa4 100644 --- a/Source/BinInterop.cpp +++ b/Source/BinInterop.cpp @@ -268,7 +268,7 @@ static bool GetTLBVersionInterop(const TCHAR *filepath, DWORD &high, DWORD &low) { if (!result && !resonly) result = MSTLB_GetVersion(pFileData, size, high, low); // A raw TLB file? if (!result) result = GetTLBVersionUsingRE(pFileData, size, resid, high, low); // A resource in a PE file? - // TODO: if (!result) result = GetTLBVersion16(pFileData, size, resid, high, low); // A resouce in a 16-bit executable? + // TODO: if (!result) result = GetTLBVersion16(pFileData, size, resid, high, low); // A resource in a 16-bit executable? free(pFileData); } // Not supported: if (!result) result = GetTLBVersionFromMoniker(filepath, high, low); diff --git a/Source/exehead/Ui.c b/Source/exehead/Ui.c index 367b9279..aef476ed 100644 --- a/Source/exehead/Ui.c +++ b/Source/exehead/Ui.c @@ -126,6 +126,13 @@ static void NSISCALL NotifyCurWnd(UINT uNotifyCode) #define GetUIItem(it) GetDlgItem(hwndDlg,it) #ifdef NSIS_CONFIG_ENHANCEDUI_SUPPORT +// "Link Window"/"SysLink" stores a pointer in GWLP_USERDATA on 2000/XP/2003 and it crashes if we clobber it (forums.winamp.com/showthread.php?t=333379). +// Checking for ROLE_SYSTEM_LINK is probably more reliable but requires more code. +#define IsNSISCtlColor(p) ( ( ((p)->lbStyle) <= 1 ) /* BS_SOLID||BS_HOLLOW */ \ + && ( (UINT)((p)->bkmode) <= 2 ) /* TRANSPARENT||OPAQUE */ \ + && ( ((p)->flags >> CC_FLAGSSHIFTFORZERO) == 0 ) /* CC_* flags */ \ + ) + #define HandleStaticBkColor() _HandleStaticBkColor(uMsg, wParam, lParam) static INT_PTR NSISCALL _HandleStaticBkColor(UINT uMsg, WPARAM wParam, LPARAM lParam) { @@ -133,7 +140,7 @@ static INT_PTR NSISCALL _HandleStaticBkColor(UINT uMsg, WPARAM wParam, LPARAM lP { ctlcolors *c = (ctlcolors *)GetWindowLongPtr((HWND)lParam, GWLP_USERDATA); - if (c) { + if (c && IsNSISCtlColor(c)) { COLORREF text; LOGBRUSH lh; @@ -156,7 +163,7 @@ static INT_PTR NSISCALL _HandleStaticBkColor(UINT uMsg, WPARAM wParam, LPARAM lP lh.lbStyle = c->lbStyle; if (c->bkb) DeleteObject(c->bkb); - c->bkb = CreateBrushIndirect(&lh); + c->bkb = CreateBrushIndirect(&lh); // LOGBRUSH::lbHatch is ignored by BS_SOLID and BS_HOLLOW } return (INT_PTR)c->bkb; @@ -166,7 +173,7 @@ static INT_PTR NSISCALL _HandleStaticBkColor(UINT uMsg, WPARAM wParam, LPARAM lP } #else #define HandleStaticBkColor() 0 -#endif//!NSIS_CONFIG_ENHANCEDUI_SUPPORT +#endif//~ NSIS_CONFIG_ENHANCEDUI_SUPPORT #ifdef NSIS_CONFIG_LOG #if !defined(NSIS_CONFIG_LOG_ODS) && !defined(NSIS_CONFIG_LOG_STDOUT) diff --git a/Source/exehead/fileform.h b/Source/exehead/fileform.h index 82de7923..e1c6f596 100644 --- a/Source/exehead/fileform.h +++ b/Source/exehead/fileform.h @@ -467,12 +467,14 @@ typedef struct int parms[5]; } page; -// text/bg color +// ctlcolors text/bg color flags #define CC_TEXT 1 #define CC_TEXT_SYS 2 #define CC_BK 4 #define CC_BK_SYS 8 #define CC_BKB 16 +#define CC_FLAGSMASK 0x1f +#define CC_FLAGSSHIFTFORZERO 5 typedef struct { COLORREF text; diff --git a/Source/fileform.cpp b/Source/fileform.cpp index 4f75ccba..704ffa6b 100644 --- a/Source/fileform.cpp +++ b/Source/fileform.cpp @@ -149,6 +149,7 @@ void page_writer::write(const page *data) void ctlcolors_writer::write(const ctlcolors *data, const writer_target_info&ti) { + assert(CC_FLAGSMASK >> CC_FLAGSSHIFTFORZERO == 0); assert(sizeof(int) == 4 && sizeof(ctlcolors64) > sizeof(ctlcolors32)); const ctlcolors *p = data; m_sink->write_int(p->text);