| View previous topic :: View next topic |
| Author |
Message |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Sun Jul 16, 2006 2:42 pm Post subject: Enable/Disable a button on another program's window |
|
|
I could swear I read something about this here before, but I searched and
searched and found nothing.
I need to enable a button on a foreign window... Could this be done? I think
you could use an API message but I'm not sure which one to use.
Thanks for any help....
FF _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Sun Jul 16, 2006 2:59 pm Post subject: |
|
|
Hey FF,
I believe the API you are looking for is EnableWindow().
BOOL EnableWindow(HWND, BOOL); _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
Garrett Moderator Team
Joined: 04 Oct 2001 Posts: 2149 Location: A House
|
Posted: Sun Jul 16, 2006 6:07 pm Post subject: |
|
|
REM ----------------------------------------------------------------
REM ENABLEWINDOW [Enable/Disable window/control]
REM ----------------------------------------------------------------
LOADLIB USER32.DLL
%H = @strdel(<ID of Window/Control>,1,1)
%I = @lib(user32,EnableWindow,INT:,%H,"FALSE")
FREELIB USER32.DLL
REM
REM Return Values:
REM
REM If the window was previously disabled, the
REM return value is nonzero.
REM If the window was not previously disabled, the
REM return value is zero.
REM
REM [POSSIBLE PARAMETERS]
REM Enable parameter = TRUE
REM Disable parameter = FALSE
REM |
|
| Back to top |
|
 |
ShinobiSoft Professional Member


Joined: 06 Nov 2002 Posts: 790 Location: Knoxville, Tn
|
Posted: Sun Jul 16, 2006 6:17 pm Post subject: |
|
|
You should also be able to use the @sendmsg() function. The message to
send is WM_ENABLE.
WM_ENABLE == $000A or 10
WPARAM == '1' to enable, '0' to disable
LPARAM == 0
%%result = @sendmsg(windowHandle, 10, 0, 0);
REM Would disable the window identified by 'windowHandle'. _________________ Bill Weckel
ShinobiSoft Software
"The way is known to all, but not all know it." |
|
| Back to top |
|
 |
FreezingFire Admin Team

Joined: 23 Jun 2002 Posts: 3508
|
Posted: Mon Jul 17, 2006 4:19 am Post subject: |
|
|
Thanks guys! Just what I needed....
FF _________________ FreezingFire
VDSWORLD.com
Site Admin Team |
|
| Back to top |
|
 |
|