forum.vdsworld.com Forum Index forum.vdsworld.com
Visit VDSWORLD.com
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 


Enable/Disable a button on another program's window

 
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help
View previous topic :: View next topic  
Author Message
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Sun Jul 16, 2006 2:42 pm    Post subject: Enable/Disable a button on another program's window Reply with quote

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
View user's profile Send private message Visit poster's website
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Sun Jul 16, 2006 2:59 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
Garrett
Moderator Team


Joined: 04 Oct 2001
Posts: 2149
Location: A House

PostPosted: Sun Jul 16, 2006 6:07 pm    Post subject: Reply with quote

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
View user's profile Send private message
ShinobiSoft
Professional Member
Professional Member


Joined: 06 Nov 2002
Posts: 790
Location: Knoxville, Tn

PostPosted: Sun Jul 16, 2006 6:17 pm    Post subject: Reply with quote

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
View user's profile Send private message Send e-mail Visit poster's website Yahoo Messenger
FreezingFire
Admin Team


Joined: 23 Jun 2002
Posts: 3508

PostPosted: Mon Jul 17, 2006 4:19 am    Post subject: Reply with quote

Thanks guys! Just what I needed.... Very Happy

FF

_________________
FreezingFire
VDSWORLD.com
Site Admin Team
Back to top
View user's profile Send private message Visit poster's website
Display posts from previous:   
Post new topic   Reply to topic    forum.vdsworld.com Forum Index -> General Help All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum

Twitter@vdsworld       RSS

Powered by phpBB © 2001, 2005 phpBB Group