Added EnableWindow

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@2727 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
kichik 2003-07-16 22:36:18 +00:00
parent 6981f2a107
commit 2adb778918
4 changed files with 15 additions and 1 deletions

View file

@ -796,7 +796,10 @@ static int NSISCALL ExecuteEntry(entry *entry_)
break;
case EW_SHOWWINDOW:
if (parm2) log_printf("HideWindow");
ShowWindow((HWND)process_string_fromparm_toint(0),process_string_fromparm_toint(1));
if (!parm3)
ShowWindow((HWND)process_string_fromparm_toint(0),process_string_fromparm_toint(1));
else
EnableWindow((HWND)process_string_fromparm_toint(0),process_string_fromparm_toint(1));
break;
#endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT
#endif//NSIS_SUPPORT_HWNDS

View file

@ -3287,6 +3287,13 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
}
SCRIPT_MSG("\n");
return add_entry(&ent);
case TOK_ENABLEWINDOW:
ent.which=EW_SHOWWINDOW;
ent.offsets[0]=add_string(line.gettoken_str(1));
ent.offsets[1]=add_string(line.gettoken_str(2));
ent.offsets[3]=1;
SCRIPT_MSG("EnableWindow: handle=%s enable=%s\n",line.gettoken_str(1),line.gettoken_str(2));
return add_entry(&ent);
case TOK_SHOWWINDOW:
ent.which=EW_SHOWWINDOW;
ent.offsets[0]=add_string(line.gettoken_str(1));
@ -3321,6 +3328,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
case TOK_BRINGTOFRONT:
case TOK_CREATEFONT:
case TOK_HIDEWINDOW:
case TOK_ENABLEWINDOW:
ERROR_MSG("Error: %s specified, NSIS_CONFIG_ENHANCEDUI_SUPPORT not defined.\n", line.gettoken_str(0));
return PS_ERROR;
#endif//NSIS_CONFIG_ENHANCEDUI_SUPPORT
@ -3331,6 +3339,7 @@ int CEXEBuild::doCommand(int which_token, LineParser &line)
case TOK_GETDLGITEM:
case TOK_SETBKCOLOR:
case TOK_SHOWWINDOW:
case TOK_ENABLEWINDOW:
case TOK_CREATEFONT:
case TOK_HIDEWINDOW:
case TOK_BRINGTOFRONT:

View file

@ -50,6 +50,7 @@ static tokenType tokenlist[TOK__LAST] =
{TOK_DIRSHOW,"DirShow",1,0,"(show|hide)"},
{TOK_ROOTDIRINST,"AllowRootDirInstall",1,0,"(true|false)"},
{TOK_CHECKBITMAP,"CheckBitmap",1,0,"local_bitmap.bmp"},
{TOK_ENABLEWINDOW,"EnableWindow",2,0,"hwnd (1|0)"},
{TOK_ENUMREGKEY,"EnumRegKey",4,0,"$(user_var: output) rootkey subkey index\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD)"},
{TOK_ENUMREGVAL,"EnumRegValue",4,0,"$(user_var: output) rootkey subkey index\n root_key=(HKCR|HKLM|HKCU|HKU|HKCC|HKDD|HKPD)"},
{TOK_EXCH,"Exch",0,1,"[$(user_var)] | [stack_item_index]"},

View file

@ -212,6 +212,7 @@ enum
TOK_INITPLUGINSDIR,
TOK_CREATEFONT,
TOK_SHOWWINDOW,
TOK_ENABLEWINDOW,
// Added by ramon 23 May 2003
TOK_ALLOWSKIPFILES,
// Added by ramon 3 jun 2003