• Welcome to Theos PowerBasic Museum 2017.

BassBox 2011 (version 2.60)

Started by Patrice Terrier, January 07, 2009, 09:03:47 PM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Patrice Terrier

In the MATRIX plugin, the HUD's arrow should be shown/active, only, when the BassBox is the active window (ForeGroundWindow).

This can be easily fixed, checking if the parent window is playing in the foreground like this:

DECLARE FUNCTION GetForegroundWindow LIB "USER32.DLL" ALIAS "GetForegroundWindow" () AS DWORD

         IF GetForeGroundWindow() = GetParent(BBP.ParentWindow) THEN
            CALL BBP_DrawUperHUD (BBP.ParentWindow)
            CALL BBP_DrawLowerHUD (BBP.ParentWindow)
         END IF


...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Jürgen Huhn

Patrice,

i can`t reproduce this error with my Computer... I use WinXP ServicePack 3!

Here you can see that BassBox isn`t active and the HUD Buttons are visible.
.¸.•'´¯)¸.•'´¯)¸.•'´¯)¸.•'´¯)
¤ª"˜¨¨¯¯¨¨˜"ª¤....¤ ª"˜¨

Patrice Terrier

Quotei can`t reproduce this error with my Computer... I use WinXP ServicePack 3!

It works very well with Seven.

If it doesn't work by you, then it could be that the foreground window can be NULL in certain circumstances, such as when a window is losing activation.

See MSDN documentation about GetForegroundWindow here.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Jürgen Huhn

Patrice,

i  think this is the right Statement wich  return what `s needed for this Behavior.
Does it on WinXP and will work also on Windows 7..

            IF GetActiveWindow() = GetParent(BBP.ParentWindow) THEN

Because the Handle from active Window is needed and not the Handlel from Forgroundwindwindow!!
There will come more other issuess in the Future for a different Windowhandle....

Better use "GetActiveWindow" instead also on Win7!  :>)
.¸.•'´¯)¸.•'´¯)¸.•'´¯)¸.•'´¯)
¤ª"˜¨¨¯¯¨¨˜"ª¤....¤ ª"˜¨

Jürgen Huhn

#64
Bonjour Patrice and other`s...

I fixed and tested this Solution the last two weeks on WinXP-Pro SP3..
And a Friend of mine use it same time on Windows Vista Ultimate and Windows7.
It works fine and fast in any Case that i was able to test it.

The MainWindow must be an activ ParentWindow and also the ForegroundWindow to recive Mouse or Keyboardinput to his Child windows!

DECLARE FUNCTION GetForegroundWindow LIB "USER32.DLL" ALIAS "GetForegroundWindow" () AS DWORD
DECLARE FUNCTION GetActiveWindow LIB "USER32.DLL" ALIAS "GetActiveWindow" ( ) AS DWORD  

' Handle of Window in static Storage..

' Save way to keep a Handle for the use in any Place of SourceCode.
' CALL JH_BBMainWindow(GetParent(BBP.ParentWindow), -1) to save the Handle.
'----====xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx====----
' read  EG.:  IF GetActiveWindow() = JH_BBMainWindow(0, 0) THEN  
'----====xxxxxxxxxxxxxxxxxxxxxxxx-JH_BBMainWindow-xxxxxxxxxxxxxxxxxxxxxxxxxx====----
FUNCTION JH_BBMainWindow(BYVAL BB_Main AS DWORD, rw AS LONG) AS DWORD
    STATIC BBParent AS DWORD
      IF rw THEN BBParent = BB_Main
      FUNCTION = BBParent
END FUNCTION
'
'----====xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx====----
'
'----====xxxxxxxxxxxxxxxxxxxxxxxxxx-JH_DrawBHUD-xxxxxxxxxxxxxxxxxxxxxxxxxxx====----
'
'----====xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx====----
SUB JH_DrawHUD(BYVAL BB_Main AS DWORD)
   STATIC rw AS LONG
     IF NOT rw THEN rw = -1 : CALL JH_BBMainWindow(GetParent(BB_Main), rw)
     IF GetActiveWindow() = JH_BBMainWindow(0, 0) THEN
        IF GetForegroundWindow() = JH_BBMainWindow(0, 0) THEN
           CALL BBP_DrawUperHUD (BB_Main)
           CALL BBP_DrawLowerHUD (BB_Main)
        END IF
     END IF
END SUB
'----====xxxxxxxxxxxxxxxxxxxxxxxxxx-JH_DrawBHUD-xxxxxxxxxxxxxxxxxxxxxxxxxxxx====----

Only one Line in MainProc..

'//------------------------------------------------------
          CALL JH_DrawHUD(BBP.ParentWindow)
'//------------------------------------------------------

Regards,

Jürgen

...
.¸.•'´¯)¸.•'´¯)¸.•'´¯)¸.•'´¯)
¤ª"˜¨¨¯¯¨¨˜"ª¤....¤ ª"˜¨

Patrice Terrier

Jürgen,

I did myself the same changes, but i didn't post it there, as it seems that we are alone (you and me) to use this plugin.
See the "matrix.zip" file that is attached to the first post of this thread, and you will see that it has never been downloaded.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Jürgen Huhn

Ok Patrice,

but just over night it`s downloaded four times.  ???

Thanks`for your Information!

...
.¸.•'´¯)¸.•'´¯)¸.•'´¯)¸.•'´¯)
¤ª"˜¨¨¯¯¨¨˜"ª¤....¤ ª"˜¨

Patrice Terrier

Quotebut just over night it`s downloaded four times
That's funny, isn't it?  :D

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Patrice Terrier

Jürgen,

Here are some other good candidates, as i like them: http://vimeo.com/169308
:)

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Jürgen Huhn

Thank's for the Link Patrice!!

There are some really nice Visualisation's..

One of my Favorit is this one:

Magnetosphere, revisited (from 2007)

http://vimeo.com/8581392


;)
.¸.•'´¯)¸.•'´¯)¸.•'´¯)¸.•'´¯)
¤ª"˜¨¨¯¯¨¨˜"ª¤....¤ ª"˜¨

Patrice Terrier

Jürgen,

I have reworked the eyes, may be you will like it as well  ;)

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Jürgen Huhn

 :)

Really nice!!
Especially is the Mix of the shadow, glass and color Effects..

I`ll render also an image of a Eyes - maybe only one. I have an Idear!!

But firrst, see the new largest "Image" on Earth:

From the 100 Gigapixel Project..!

http://www.paris-26-gigapixels.com/index-en.html

...
.¸.•'´¯)¸.•'´¯)¸.•'´¯)¸.•'´¯)
¤ª"˜¨¨¯¯¨¨˜"ª¤....¤ ª"˜¨

Patrice Terrier

Jürgen

This 100 gigapixel view of Paris, is really amazing, i didn't know it. Thanks for sharing.

...
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Jürgen Huhn

#73
Patrice,

This final Version is the third Step and is expected to be exactly 26.7 gigapixels – to
finally 106.8 gigapixel for 360 degree PanoramaView like this one:

http://www.visites-interactives.eu/


Here are the other two Final Versions of the Project:

http://www.harlem-13-gigapixels.com/
http://www.yosemite-17-gigapixels.com/

enjoy!
..
.¸.•'´¯)¸.•'´¯)¸.•'´¯)¸.•'´¯)
¤ª"˜¨¨¯¯¨¨˜"ª¤....¤ ª"˜¨

Jürgen Huhn

#74
Merci Patrice,

i saw it and removed my Post!

I declared oncaption as Global to use it as Flag for:

        CASE %WM_LBUTTONDBLCLK
                IF onCaption = 0 THEN CALL PostMessage(JH_BBMainWindow(BBP.ParentWindow,0) , %WM_COMMAND, MAK(LONG, %ID_FULLSCREEN, 0), 0)

To prevent sending this Message by doubleclick on the HUD Buttons. That was one of the last settings before ì post it.
I`ve updated the  Code, because ìn the available Version`s is the active Window Input not changed or updated until now.
And by fixing it i get some Idear`s for different states on the Button`s, if the Mouse is over a Button.
The Button switch to red. It`possible to set a third state.

I`ve checked the Code today and i found nothing more wrong... But tomorrow i will proof the Code again to be sure!

Thank you very much for your Response and for the Work..
Think i understand your meaning about it.

Here i have an older Link but maybe you didn`t saw it.
http://www.youtube.com/watch?v=rKgU6ubBgJA&feature=related

Best Regards,

Jürgen  
.¸.•'´¯)¸.•'´¯)¸.•'´¯)¸.•'´¯)
¤ª"˜¨¨¯¯¨¨˜"ª¤....¤ ª"˜¨