Changed SendMessage: WM_SETTEXT no longer implies string (hack), and lParam and wParam can pass strings if they begin with STR:

git-svn-id: https://svn.code.sf.net/p/nsis/code/NSIS/trunk@1003 212acab6-be3b-0410-9dea-997c60f758d6
This commit is contained in:
justin1014 2002-09-13 20:59:04 +00:00
parent a607325d97
commit ec4e89dbf5

View file

@ -652,16 +652,21 @@ static int NSISCALL ExecuteEntry(entry *entries, int pos)
int b3=process_string_fromtab_toint(parm3);
int b4=process_string_fromtab_toint(parm4);
process_string_fromtab(buf,parm1);
process_string_fromtab(buf2,parm2);
if (which == EW_SENDMESSAGE)
{
process_string_fromtab(buf,parm3);
process_string_fromtab(buf2,parm4);
if (*(int*)buf == *(int*)"STR:") b3=(int)buf+4;
if (*(int*)buf2 == *(int*)"STR:") b4=(int)buf2+4;
if (myatoi(buf2)==WM_SETTEXT) {
process_string_fromtab(buf3,parm4);
b4=(int)buf3;
v=SendMessage((HWND)process_string_fromtab_toint(parm1),process_string_fromtab_toint(parm2),b3,b4);
}
else
{
process_string_fromtab(buf,parm1);
process_string_fromtab(buf2,parm2);
v=(int)FindWindowEx((HWND)b3,(HWND)b4,buf[0]?buf:NULL,buf2[0]?buf2:NULL);
}
if (which == EW_SENDMESSAGE) v=SendMessage((HWND)myatoi(buf),myatoi(buf2),b3,b4);
else v=(int)FindWindowEx((HWND)b3,(HWND)b4,buf[0]?buf:NULL,buf2[0]?buf2:NULL);
if (parm0>=0)
myitoa(g_usrvars[parm0],v);