Page 1 of 1

How to get 'normal' color in Folder?

Posted: Sat Dec 31, 2005 8:50 am
by John
Hi,

when using folders and the Windows XP Manifest, the color of the background is different than without using folders, it's more lighter.

Can i change this back with the COLOR parameter and if so, what color should i use?

Thanks,

John.

Posted: Sat Dec 31, 2005 10:10 am
by Antonio Linares
John,

Could you please post some pictures of what you mean ?

Please use http://www.imageshack.us to upload the images and post here the URLs to display them. Thanks.

Posted: Sun Jan 01, 2006 6:36 am
by John
Hi Antonio,

here's the printscreen, i've pasted both dialogs on top of each other to see the difference.

Image

If I'm not using the manifest everything looks ok, FWH25/Harbour also looks ok.

Regards,

John.

Posted: Sun Jan 01, 2006 7:27 am
by Antonio Linares
John,

Thats the normal and "desired" look. Folders look with gradient, meanwhile dialogboxes no.

Anyhow if you want to remove the folders color, simply change this line from Class TFolder:

Code: Select all

Method Default() CLASS TFolder
      ...
      #ifndef __CLIPPER__
         if IsAppThemed()
            // oDlg:bEraseBkGnd = { | hDC | DrawPBack( oDlg:hWnd, hDC ), 1 }
         endif
      #endif
      ...

Posted: Sun Jan 01, 2006 10:29 am
by John
thanks Antonio,

only changing this in source\classes\folder.prg and recompiling my program won't do the trick, so i guess i have to do a little bit more?

Regards,

John.

Posted: Sun Jan 01, 2006 10:38 am
by Enrico Maria Giordano
Try adding folder.prg to your compile and link script.

EMG

Posted: Sun Jan 01, 2006 3:38 pm
by John
Hi Enrico,

isn't there a way to do this in my code?

like changing one of the parameters?
oDlg:bEraseBkGnd = { | hDC | DrawPBack( oDlg:hWnd, hDC ), 1 }

Posted: Sun Jan 01, 2006 4:16 pm
by Enrico Maria Giordano
Try this:

Code: Select all

#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg, oFld

    DEFINE DIALOG oDlg;
           RESOURCE "FOLDERTEST"

    REDEFINE FOLDER oFld;
             ID 101 OF oDlg;
             PROMPTS "Test1", "Test2";
             DIALOGS "TEST1", "TEST2"

    oDlg:bStart = { || MySet( oFld ) }

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


STATIC FUNCTION MYSET( oFld )

    LOCAL i

    FOR i = 1 TO LEN( oFld:aDialogs )
        oFld:aDialogs[ i ]:bEraseBkGnd = NIL
    NEXT

    RETURN NIL

Code: Select all

/****************************************************************************


test.rc

produced by Borland Resource Workshop


*****************************************************************************/


FOLDERTEST DIALOG 49, 52, 365, 295
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
CAPTION "Folder test"
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
 CONTROL "", 101, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE, 5, 5, 355, 285
}


TEST1 DIALOG 49, 52, 365, 295
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
 CONTROL "Test1", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 10, 15, 20, 10
}


TEST2 DIALOG 49, 52, 365, 295
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
 CONTROL "Test2", -1, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 10, 15, 20, 10
}


1 24 LOADONCALL MOVEABLE 
{
 '3C 3F 78 6D 6C 20 76 65 72 73 69 6F 6E 3D 22 31'
 '2E 30 22 20 65 6E 63 6F 64 69 6E 67 3D 22 55 54'
 '46 2D 38 22 20 73 74 61 6E 64 61 6C 6F 6E 65 3D'
 '22 79 65 73 22 3F 3E 0D 0A 3C 61 73 73 65 6D 62'
 '6C 79 20 78 6D 6C 6E 73 3D 22 75 72 6E 3A 73 63'
 '68 65 6D 61 73 2D 6D 69 63 72 6F 73 6F 66 74 2D'
 '63 6F 6D 3A 61 73 6D 2E 76 31 22 0D 0A 6D 61 6E'
 '69 66 65 73 74 56 65 72 73 69 6F 6E 3D 22 31 2E'
 '30 22 3E 0D 0A 3C 61 73 73 65 6D 62 6C 79 49 64'
 '65 6E 74 69 74 79 0D 0A 20 20 20 20 6E 61 6D 65'
 '3D 22 59 6F 75 72 2E 41 70 70 6C 69 63 61 74 69'
 '6F 6E 2E 4E 61 6D 65 2E 48 65 72 65 22 0D 0A 20'
 '20 20 20 70 72 6F 63 65 73 73 6F 72 41 72 63 68'
 '69 74 65 63 74 75 72 65 3D 22 78 38 36 22 0D 0A'
 '20 20 20 20 76 65 72 73 69 6F 6E 3D 22 31 2E 30'
 '2E 30 2E 30 22 0D 0A 20 20 20 20 74 79 70 65 3D'
 '22 77 69 6E 33 32 22 2F 3E 0D 0A 3C 64 65 73 63'
 '72 69 70 74 69 6F 6E 3E 57 69 6E 64 6F 77 73 20'
 '53 68 65 6C 6C 3C 2F 64 65 73 63 72 69 70 74 69'
 '6F 6E 3E 0D 0A 3C 64 65 70 65 6E 64 65 6E 63 79'
 '3E 0D 0A 20 20 20 20 3C 64 65 70 65 6E 64 65 6E'
 '74 41 73 73 65 6D 62 6C 79 3E 0D 0A 20 20 20 20'
 '20 20 20 20 3C 61 73 73 65 6D 62 6C 79 49 64 65'
 '6E 74 69 74 79 0D 0A 20 20 20 20 20 20 20 20 20'
 '20 20 20 74 79 70 65 3D 22 77 69 6E 33 32 22 0D'
 '0A 20 20 20 20 20 20 20 20 20 20 20 20 6E 61 6D'
 '65 3D 22 4D 69 63 72 6F 73 6F 66 74 2E 57 69 6E'
 '64 6F 77 73 2E 43 6F 6D 6D 6F 6E 2D 43 6F 6E 74'
 '72 6F 6C 73 22 0D 0A 20 20 20 20 20 20 20 20 20'
 '20 20 20 76 65 72 73 69 6F 6E 3D 22 36 2E 30 2E'
 '30 2E 30 22 0D 0A 20 20 20 20 20 20 20 20 20 20'
 '20 20 70 72 6F 63 65 73 73 6F 72 41 72 63 68 69'
 '74 65 63 74 75 72 65 3D 22 78 38 36 22 0D 0A 20'
 '20 20 20 20 20 20 20 20 20 20 20 70 75 62 6C 69'
 '63 4B 65 79 54 6F 6B 65 6E 3D 22 36 35 39 35 62'
 '36 34 31 34 34 63 63 66 31 64 66 22 0D 0A 20 20'
 '20 20 20 20 20 20 20 20 20 20 6C 61 6E 67 75 61'
 '67 65 3D 22 2A 22 0D 0A 20 20 20 20 20 20 20 20'
 '2F 3E 0D 0A 20 20 20 20 3C 2F 64 65 70 65 6E 64'
 '65 6E 74 41 73 73 65 6D 62 6C 79 3E 0D 0A 3C 2F'
 '64 65 70 65 6E 64 65 6E 63 79 3E 0D 0A 3C 2F 61'
 '73 73 65 6D 62 6C 79 3E'
}
EMG

Posted: Sun Jan 01, 2006 4:38 pm
by John
works perfect Enrico, thanks!