diff --git a/Source/exehead/exec.c b/Source/exehead/exec.c index a42a2529..1974b92e 100644 --- a/Source/exehead/exec.c +++ b/Source/exehead/exec.c @@ -672,6 +672,9 @@ static int NSISCALL ExecuteEntry(entry *entries, int pos) ) ); return 0; + case EW_SETWINDOWLONG: + SetWindowLong((HWND)process_string_fromtab_toint(parms[0]),parms[1],process_string_fromtab_toint(parms[2])); + return 0; #endif #ifdef NSIS_SUPPORT_SHELLEXECUTE case EW_SHELLEXEC: // this uses improvements of Andras Varga @@ -888,10 +891,10 @@ static int NSISCALL ExecuteEntry(entry *entries, int pos) op.pFrom=buf; op.pTo=buf2; op.lpszProgressTitle=buf3; - op.fFlags=parms[2]; + op.fFlags=parms[2]; update_status_text("",buf3); res=SHFileOperation(&op); - if (res) + if (res) { // some of these changes were from Edgewise (wiked_edge@yahoo.com) update_status_text_from_lang(LANGID_COPYFAILED,""); exec_errorflag++; diff --git a/Source/script.cpp b/Source/script.cpp index b77d9592..a50b9702 100644 --- a/Source/script.cpp +++ b/Source/script.cpp @@ -2211,11 +2211,18 @@ int CEXEBuild::doCommand(int which_token, LineParser &line, FILE *fp, const char ent.offsets[2]=add_string(line.gettoken_str(3)); SCRIPT_MSG("GetDlgItem: output=%s dialog=%s item=%s\n",line.gettoken_str(1),line.gettoken_str(2),line.gettoken_str(3)); return add_entry(&ent); + case TOK_SETSTATICBKCOLOR: + ent.which=EW_SETWINDOWLONG; + ent.offsets[0]=add_string(line.gettoken_str(1)); + ent.offsets[1]=GWL_USERDATA; + ent.offsets[2]=add_string(line.gettoken_str(2)); + return add_entry(&ent); #else//!NSIS_SUPPORT_HWNDS case TOK_ISWINDOW: case TOK_SENDMESSAGE: case TOK_FINDWINDOW: case TOK_GETDLGITEM: + case TOK_SETSTATICBKCOLOR: ERROR_MSG("Error: %s specified, NSIS_SUPPORT_HWNDS not defined.\n", line.gettoken_str(0)); return PS_ERROR; #endif//!NSIS_SUPPORT_HWNDS diff --git a/Source/tokens.cpp b/Source/tokens.cpp index 1508e087..097eea1b 100644 --- a/Source/tokens.cpp +++ b/Source/tokens.cpp @@ -139,6 +139,7 @@ static tokenType tokenlist[TOK__LAST] = {TOK_SETOVERWRITE,"SetOverwrite",1,0,"(on|off|try|ifnewer)"}, {TOK_SETREBOOTFLAG,"SetRebootFlag",1,0,"true|false"}, {TOK_SETSHELLVARCONTEXT,"SetShellVarContext",1,0,"all|current"}, +{TOK_SETSTATICBKCOLOR,"SetStaticBkColor",2,0,"hwnd color"}, {TOK_SHOWDETAILS,"ShowInstDetails",1,0,"(hide|show|nevershow)"}, {TOK_SHOWDETAILSUNINST,"ShowUninstDetails",1,0,"(hide|show|nevershow)"}, {TOK_SILENTINST,"SilentInstall",1,0,"(normal|silent|silentlog)"}, diff --git a/Source/tokens.h b/Source/tokens.h index 30e3e6e2..26725d33 100644 --- a/Source/tokens.h +++ b/Source/tokens.h @@ -163,6 +163,7 @@ enum TOK_SENDMESSAGE, TOK_ISWINDOW, TOK_GETDLGITEM, + TOK_SETSTATICBKCOLOR, TOK_FINDFIRST, TOK_FINDNEXT, TOK_FINDCLOSE,