View Full Version : how to SetMask slider
10-31-2005, 12:40 AM
how to SetMask slider
10-31-2005, 04:08 AM
Only objects with WindowHandle can be setMask(ed).
The slider is a "windowed" object, but there isn't a native way within AMS to get the window handle. You could use the SetMask DLL I wrote to mask this particular object thought. If interested, follow the link in my signature.
10-31-2005, 08:41 AM
I didn't know that!
What other objects does you Dll support that the builtin SetMask in AMS doesn't?
Any object (except the Flash Window), as best I know, that returns a Window Handle can be masked. Whether its through v6 or my SetMask DLL.
Let me clarify. The SetMask in AMS6 will mask the slider. The problem is that the Plugin Actions do not allow you to use GetProperties to get a Window Handle to use in the action.
When I wrote SetMask, I didn't have the luxury of getting the window handle of the objects back in v5. I used some API calls to get the window handle (GetWindow and ChildWindowFromPoint). Ultimately, all v6 needs is the abilty to get the plugins handle (if there is one) to mask it.
Here is a example that uses the above API calls, and v6's SetMask to mask the slider.
10-31-2005, 11:38 AM
There are apparently several objects that you cant get the window properties to.
One of the first that I noticed is the Thumb List object.
I am using WORM's Setmask until/if there are changes made to get propeties for all windowed objects.
I have had problems with using the internal setmask and WORM's setmask in the same project. The application setmask that is enabled in the project settings is ok, but trying to use both on objects can cause problems. Also, some times I have problems exporting a project if I use both.
Using the method I use in the example above, you would be able to use the AMS SetMask to mask the thumblist.
Don't get me wrong, I'd rather everybody buy the DLL. That'd be cool!! But, I wouldn't feel right if I didn't share the small bit of code it takes to get the handle of the plugin object.
GW_CHILD = 5;
--Get the position of the object to mask
tblPos = Plugin.GetPos("Slider")
--get the handle of the object
--I'm using the upper left corner here, but you should use a spot that
--is unique only to this control, or where you know it is topmost in the
--z-order of controls at that position
hwndChild = DLL.CallFunction(_SystemFolder.."\\User32.dll", "GetWindow", Application.GetWndHandle()..","..GW_CHILD, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
HWnd = DLL.CallFunction(_SystemFolder.."\\User32.dll", "ChildWindowFromPoint", hwndChild..","..tblPos.X..","..tblPos.Y, DLL_RETURN_TYPE_LONG, DLL_CALL_STDCALL)
--set the mask using the handle
Window.SetMask(HWnd, "AutoPlay\\Images\\630_11.png", true, 0)
10-31-2005, 11:49 AM
:) :yes :p
Caught me editing :)
11-02-2005, 02:04 PM
any way to make or build slider from out or inner sources...
Powered by vBulletin™ Version 4.0.6 Copyright © 2013 vBulletin Solutions, Inc. All rights reserved.