difference between xp and seven

difference between xp and seven

Postby MarcoBoschi » Mon Mar 21, 2011 5:09 pm

Is it normal this difference?
(see below screen shots)
Thanks in advance
Marco

>>fold.prg<<<

#include "fivewin.ch"

FUNCTION MAIN()

LOCAL oDlg
LOCAL oFld
LOCAL aFld := { }

LOCAL oSay1 , cSay1 := "First"
LOCAL oGet1 , cGet1 := SPACE( 10 )

LOCAL oSay2 , cSay2 := "Second"
LOCAL oGet2 , cGet2 := SPACE( 10 )

DEFINE DIALOG oDlg RESOURCE "DIALOG_1"

REDEFINE SAY oSay1 ID 401 OF oDlg
REDEFINE GET oGet1 ID 101 OF oDlg

REDEFINE FOLDER oFld ID 301 OF oDlg PROMPT "Folder" DIALOGS "FOLD_1"

REDEFINE SAY oSay2 ID 402 OF oFld:aDialogs[ 1 ]
REDEFINE GET oGet2 ID 102 OF oFld:aDialogs[ 1 ]

ACTIVATE DIALOG oDlg CENTER

RETURN NIL

>>fold.rc<<<


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


fold.rc

produced by Borland Resource Workshop


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


DIALOG_1 DIALOG 3, 3, 341, 240
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME | WS_MINIMIZEBOX | WS_MAXIMIZEBOX
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
CONTROL "Work", 610, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 6, 0, 321, 69
CONTROL "", 101, "EDIT", ES_LEFT | ES_AUTOHSCROLL | ES_READONLY | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 107, 18, 42, 16
CONTROL "First", 401, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 19, 18, 34, 13
CONTROL "", 1029, "EDIT", ES_LEFT | ES_AUTOHSCROLL | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 473, 9, 74, 13
CONTROL "", 301, "SysTabControl32", 0 | WS_CHILD | WS_VISIBLE | WS_TABSTOP, 6, 75, 324, 151
}


FOLD_1 DIALOG 4, -10, 137, 98
STYLE WS_CHILD
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
{
CONTROL "Descrizioni", 116, "BUTTON", BS_GROUPBOX | WS_CHILD | WS_VISIBLE, 5, 6, 130, 81
CONTROL "Second", 402, "STATIC", SS_LEFT | WS_CHILD | WS_VISIBLE | WS_GROUP, 53, 15, 56, 13
CONTROL "", 102, "EDIT", ES_LEFT | ES_READONLY | ES_WANTRETURN | WS_CHILD | WS_VISIBLE | WS_BORDER | WS_TABSTOP, 10, 37, 119, 20
}


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 20 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 76 65 72 73 69'
'6F 6E 3D 22 31 2E 30 2E 30 2E 30 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 58 38 36 22 0D 0A 20'
'20 20 20 6E 61 6D 65 3D 22 46 69 76 65 54 65 63'
'68 20 53 6F 66 74 77 61 72 65 2E 46 69 76 65 57'
'69 6E 2E 33 32 62 69 74 73 22 0D 0A 20 20 20 20'
'74 79 70 65 3D 22 77 69 6E 33 32 22 0D 0A 2F 3E'
'0D 0A 3C 64 65 73 63 72 69 70 74 69 6F 6E 3E 59'
'6F 75 72 20 61 70 70 6C 69 63 61 74 69 6F 6E 20'
'64 65 73 63 72 69 70 74 69 6F 6E 20 68 65 72 65'
'2E 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 58 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 0D 0A'
}

two screenshot
first
xp
Image

second
windows 7
Image
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: difference between xp and seven

Postby MarcoBoschi » Tue Mar 22, 2011 1:17 pm

In Xp computer I set Windows Classic Style.
I obtain the same problem of Windows 7 Pc

If I don't redefine SAY objects

// REDEFINE SAY oSay2 ID 402 OF oFld:aDialogs[ 1 ]

they appears in this way
Image



Is there a solution to resolve this problem?
I obviously want to avoid the redefine of every say object....

Many thanks
Marco
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: difference between xp and seven

Postby Armando » Tue Mar 22, 2011 2:58 pm

Marco:

Try in your resources file to use -1 value for the groupbox instead 116 value.

Regards
SOI, s.a. de c.v.
estbucarm@gmail.com
http://www.soisa.mex.tl/
http://sqlcmd.blogspot.com/
Tel. (722) 174 44 45
Carpe diem quam minimum credula postero
User avatar
Armando
 
Posts: 3217
Joined: Fri Oct 07, 2005 8:20 pm
Location: Toluca, México

Re: difference between xp and seven (solved)

Postby MarcoBoschi » Tue Mar 22, 2011 3:34 pm

I do not understand but.....
thank you very much ....

SOLVED!
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: difference between xp and seven

Postby James Bott » Wed Mar 23, 2011 2:32 pm

Marco,

Do you mean you don't understand why -1 works, or that you found a different solution.

The value -1, signifies static text--any positive number signifies text that can be redefined. They are handled differently by Windows.

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: difference between xp and seven

Postby MarcoBoschi » Wed Mar 23, 2011 2:51 pm

James,
very helpful person as usual.

many thanks

marco
User avatar
MarcoBoschi
 
Posts: 1065
Joined: Thu Nov 17, 2005 11:08 am
Location: Padova - Italy

Re: difference between xp and seven

Postby Enrico Maria Giordano » Thu Mar 24, 2011 5:47 pm

James Bott wrote:The value -1, signifies static text--any positive number signifies text that can be redefined. They are handled differently by Windows.


I didn't know that Windows managed id -1 labels and id positive number labels differently. Where can I read some MS documentation about this behavior?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: difference between xp and seven

Postby James Bott » Thu Mar 24, 2011 9:22 pm

Enrico,

I don't know that much about them. Here are a few references although they don't provide much info either.

Static Text:
http://msdn.microsoft.com/en-us/library ... 50(v=vs.85).aspx

Static Controls:
http://msdn.microsoft.com/en-us/library/ms997560.aspx

Negative resource IDs:
http://msdn.microsoft.com/en-us/library ... 19(v=vs.85).aspx

Set text color on a static text control:
http://www.programmersheaven.com/mb/win ... /?S=B20000

Regards,
James
User avatar
James Bott
 
Posts: 4840
Joined: Fri Nov 18, 2005 4:52 pm
Location: San Diego, California, USA

Re: difference between xp and seven

Postby Enrico Maria Giordano » Thu Mar 24, 2011 10:40 pm

Can you point me at the exact place where they say that Windows treats a -1 id controls different from a positive id one, please?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: difference between xp and seven

Postby byte-one » Thu Mar 24, 2011 11:12 pm

Says with ID -1 (static) are not transparent in the dialogs. Only when the dialog are set to transparent, the static says are transparent.
On redefined says with ID > 0 all is ok!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: difference between xp and seven

Postby Enrico Maria Giordano » Thu Mar 24, 2011 11:49 pm

Can I see a reduced sample of this behavior? Is this behavior seen on W7 only?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: difference between xp and seven

Postby byte-one » Fri Mar 25, 2011 10:00 am

Please try next code to see the effect:
DEFINE DIALOG oDlg OF oWin TITLE "Test" COLOR CLR_BLACK,CLR_YELLOW RESOURCE "ffff"
and make in the RC a static say! It seems, only when a color of the dialog is defined, the static say is not transparent.
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: difference between xp and seven

Postby Enrico Maria Giordano » Fri Mar 25, 2011 10:13 am

This is a sample:

Code: Select all  Expand view
#include "Fivewin.ch"


FUNCTION MAIN()

    LOCAL oDlg

    DEFINE DIALOG oDlg;
           RESOURCE "LABELS";
           COLOR CLR_BLACK, CLR_GREEN

    ACTIVATE DIALOG oDlg;
             CENTER

    RETURN NIL


Code: Select all  Expand view
LABELS DIALOG 96, 44, 250, 230
STYLE DS_MODALFRAME | WS_POPUP | WS_CAPTION | WS_SYSMENU
FONT 8, "MS Sans Serif"
LANGUAGE LANG_NEUTRAL , SUBLANG_NEUTRAL
{
 LTEXT "A label test", 101, 10, 10, 230, 25
}


The label is not transparent.

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: difference between xp and seven

Postby byte-one » Fri Mar 25, 2011 12:22 pm

Please test with ID -1 !!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: difference between xp and seven

Postby Enrico Maria Giordano » Fri Mar 25, 2011 2:18 pm

Same result. Did you test my sample?

EMG
User avatar
Enrico Maria Giordano
 
Posts: 8711
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: Google [Bot] and 41 guests