Skinbox in an LsBox Thread last updated on 2004-01-31 04:06:58

Posted by member 12025 on 2004-01-29 23:09:25

How does one get a s Skinbox in an LsBox?
*SkinBox tester 5 5 5 5 #T Bitmap "C:\on.png"

Now, that shows up fine by itself. The box shows up fine.
*ModuleHook !SkinBoxLoadBoxHook te test.box 00040528

Does nothing.
!SkinBoxLoadBoxHook tester test.box 00040528

"Invalid window handle in box hook."
Now, I imagine it is as simple as getting the HWND...but how? All I've found for such a purpose so far is WinSpy++. Using that, I've tried the contents of the field labeled handle for the LsBox and the Skinbox.
So...now I'm stuck. Labels would work, but Skinbox is preferable, as it is easier to create the config (less typing) and easier to read it (it's nice having it set up as x y h w #? param value)

Posted by member 7223 on 2004-01-30 07:14:06 link

The problem is that you have to know the handle of the window you want to hook your skinbox to...
...and when I'm talking about "handle" you should know that it is not the same each time the window is create.
...and when I'm talking about "window" you should know that it could be any kind of window; not only skinboxes or lsboxes. And that's really great :)

So, using RabidVWM, you can dynamically know the handle of almost any window... but not litestep windows. So I have no clue to know the handle of a litestep module...

Posted by member 12025 on 2004-01-30 12:13:14 link

Guess it's back to the tedious Label then...

Posted by member 99 on 2004-01-31 04:06:58 link

lsBox fills in the box file name and the window handle for you:
*ModuleHook !SkinBoxLoadBoxHook name=tester


But unfortunately you can't use the *skinbox syntax in combination with that, it'll create two separate skinboxes with the same name.

You might consider using mzscript or alias to make a bang command that will set up the box:
*script bang !SkinBoxSetup
*script exec !SkinBoxMove %{\1} %{\2} %{\3} %{\4} %{\5}
*script exec !SkinBoxOnTop %{\1} %{\6}
*script exec !SkinBoxBitmap %{\1} %{\7}
*script ~bang

testerOnCreate !SkinBoxSetup {@in} 5 5 5 5 true "c:\on.png"