• Welcome to Theos PowerBasic Museum 2017.

BassBox

Started by Patrice Terrier, October 08, 2007, 10:57:44 PM

Previous topic - Next topic

0 Members and 2 Guests are viewing this topic.

Patrice Terrier

Emil

If this could console you, C# Visual Studio 2005 PictureBox (indeed i know the name, but not what it does behind the hood) has the same problem. I have no idea if this has been fixed with VS2009 or not.
Patrice Terrier
GDImage (advanced graphic addon)
http://www.zapsolution.com

Emil Weiss

#586
Patrice
Please can you send me or upload the *.rc or res file from BassBox ?
i have learn any from BassBox not understand that i have no skined button when deaktive resource File *.pbr
i think is a problem BassBox not found the right ID for the Controls.

i will show in the *.rc or *.res File which technik your use.

greets Emil

Patrice Terrier

#587
QuotePlease can you send me or upload the *.rc or res file from BassBox ?

Emil,

There is nothing fancy in the control.pbr resource file as you can see below.

1 - The control.rc file:
PROGRAM ICON BASSBOX.ICO

// Manifest info for WinXP theme support
#define CREATEPROCESS_MANIFEST_RESOURCE_ID   1
#define RT_MANIFEST                         24
#define CONTROL_PANEL_RESOURCE_ID          123

CREATEPROCESS_MANIFEST_RESOURCE_ID RT_MANIFEST "control.man"


2 - The control.man file:
<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<assembly xmlns="urn:schemas-microsoft-com:asm.v1" manifestVersion="1.0">
    <assemblyIdentity
        version="1.0.0.0"
        processorArchitecture="X86"
        name="www.zapsolution.com"
        type="win32" />
    <description>WinXP Manifest For ZAP</description>
    <dependency>
        <dependentAssembly>
            <assemblyIdentity
                type="win32"
                name="Microsoft.Windows.Common-Controls"
                version="6.0.0.0"
                processorArchitecture="X86"
                publicKeyToken="6595b64144ccf1df"
                language="*" />
        </dependentAssembly>
    </dependency>
</assembly>     
   


Added:
The use of the manifest file, is to use the Windows XP style as the default when the child controls are not skinned.

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

Emil Weiss

Thanks Patrice
Sample from BassBox

%ID_BTN_PLAY            = 1
Do not has this ID include in the Resource File ?
when deaktivate for testing
#RESOURCE "control.pbr"
then skined PlayButton no longer work when move the mouse over oder click on it.

what i can show is a original button
only for interest how it no longer work when deaktivate this

greets Emil

Patrice Terrier

#589
Emil,

First, you probably don't use the latest zSkin.inc (see BassBox24, or the PhotoSetup project)

Second, the UxTheme.dll trampolin is more versatile than the obsolete API that was responsible to draw the "button" class since Windows 3.01.

Third, move on to VISTA.  :)

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

Emil Weiss

Quote from: Patrice Terrier on October 06, 2008, 02:23:03 PM
Emil,

First, you probably don't use the latest zSkin.inc (see BassBox24, or the PhotoSetup project)

Second, the UxTheme.dll trampolin is more versatile than the obsolete API that was responsible to draw the "button" class since Windows 3.01.

Third, move on to VISTA.  :)

patrice


please show Pic
that is what i mean ...
my question work BassBox only when aktivate manifest or id this not the problem
Only what i have changed deaktivate the control.pbr in BassBox.pas

greets Emil

Patrice Terrier

There is an extra WM_NC message sent by XP that would cause this,
then it redraws the ugly default button hover my nice skinned one, but this won't occure if you use the UxTheme.dll.

I don't remember exactly if it is WM_NCPAINT or another message that would cause this behavior.

I did spend many days to make BassBox compatible with both XP and VISTA, thus better to keep existing code unchanged, if you won't get into trouble.

...

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

Emil Weiss

Quote from: Patrice Terrier on October 06, 2008, 05:32:49 PM
There is an extra WM_NC message sent by XP that would cause this,
then it redraws the ugly default button hover my nice skinned one, but this won't occure if you use the UxTheme.dll.

I don't remember exactly if it is WM_NCPAINT or another message that would cause this behavior.

I did spend many days to make BassBox compatible with both XP and VISTA, thus better to keep existing code unchanged, if you won't get into trouble.

...



BassBox is a great Software and i will nothing change on it..
only i will learn from it no other Software what i use has so a good program style and Interface
i will show in to UxTheme.dll what i can do with my Soft that's paint correctly

sorry for my bad english

greets Emil

Patrice Terrier

QuoteBassBox is a great Software and i will nothing change on it..
only i will learn from it no other Software what i use has so a good program style and Interface

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

Emil Weiss

i have aktivate the resource back and deaktivate all sub and function used UxTheme.dll in BassBox
All work fine not understand what is the difference that's you have no skined button
only when deaktivate resource file.

greets Emil

Patrice Terrier

Emil,

If you deactivate the whole resource file, then you will have a conflict with this:

wc.hIcon = LoadIcon(wc.hInstance, "PROGRAM")
in such a case the icon must be loaded from file, or use wh.hIcon = 0.

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

Patrice Terrier

I have attached a new Plugin24.zip to the first post of this thread.
These plugins must replace those provided with BassBox24.zip


Purpose of this upgrade:

See new DestroyTexture() subroutine and updated MakeMultipleTexture

SUB MakeMultipleTexture (BYVAL tp AS BBPTEXTURE PTR, BYVAL N AS LONG)
    LOCAL mtCount, K, nRet, xSize, ySize,
OkDelete AS LONG
    DIM mt(1 TO N) AS BBPTEXTURE AT tp
    mtCount = UBOUND(mt()) - LBOUND(mt()) + 1
    IF mtCount THEN
       DIM Texture(1 TO mtCount) AS LONG

       FOR K = 1 TO mtCount
           Texture(K) = mt(k).Texture: IF Texture(K) THEN OkDelete = -1
       NEXT
       IF OkDelete THEN CALL glDeleteTextures(mtCount, Texture(1))

       CALL glGenTextures(mtCount, Texture(1)): nRet = glGetError()
       IF nRet = 0 THEN
          FOR K = 1 TO mtCount
              REDIM PixelArray(0) AS BYTE
              IF BBP_CreateGLTextureFromFile(mt(K).FullName, xSize, ySize, PixelArray(), mt(K).Square) THEN
                 mt(k).Texture = Texture(K)
                 CALL glBindTexture(%GL_TEXTURE_2D, Texture(K)): nRet = glGetError
                 IF nRet = 0 THEN
                    CALL glTexParameteri(%GL_TEXTURE_2D, %GL_TEXTURE_MAG_FILTER, %GL_LINEAR)
                    CALL glTexParameteri(%GL_TEXTURE_2D, %GL_TEXTURE_MIN_FILTER, %GL_LINEAR)
                    CALL glTexImage2D(%GL_TEXTURE_2D, 0, 4, xSize&, ySize&, 0, %GL_RGBA, %GL_UNSIGNED_BYTE, PixelArray(0))
                 END IF
              END IF
          NEXT
       END IF
    END IF
END SUB


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

Emil Weiss

Thanks Patrice
i have update my archive of BassBox24
greats Emil

Jim Panse

great Work Patrice !

do you have posted the sourcefiles too??
the sourcefiles will be a good lesson to me to understand more the basslib and C#.

Thx
Jim

José Roca

 
C#? It has been written using PowerBASIC.

The sources are attached to the first post of the thread.