trasparent error in dialog

Post Reply
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

trasparent error in dialog

Post by Silvio »

I want made a dialog trasparent :

the group when traparent

the say control is trasparent but the get control where is ?

I want that the get control be no trasparent

How I can make it?

test file at :
http://hyperupload.com/download/02a8655 ... S.zip.html


Regards,
Best Regards, Saludos

Falconi Silvio
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Re: trasparent error in dialog

Post by karinha »

Silvio wrote:I want made a dialog trasparent :

the group when traparent

the say control is trasparent but the get control where is ?

I want that the get control be no trasparent

How I can make it?

test file at :
http://hyperupload.com/download/02a8655 ... S.zip.html


Regards,
#INCLUDE "FiveWin.ch"

#Define CLR_VERMELHO nRGB( 255, 000, 000 )
#Define CLR_AMARELO nRGB( 255, 255, 000 )

FUNCTION Main()

LOCAL cCodice := SPACE(40)

LOCAL oFn1, oBrush, oGroup1, oDlp

DEFINE FONT oFn1 NAME "Arial" SIZE 0, -10

//DEFINE BRUSH oBrush RESOURCE "brick3"

DEFINE BRUSH oBrush FILE "BRICK3.BMP"

DEFINE DIALOG oDlp RESOURCE "test" ;
BRUSH oBrush TRANSPARENT

REDEFINE GROUP oGroup1 ID 51 ;
PROMPT "GROUP BOX " ;
COLOR CLR_VERMELHO, CLR_AMARELO OF oDlp ;
FONT oFn1 TRANSPARENT

REDEFINE GET cCodice ID 117 OF oDlp

ACTIVATE DIALOG oDlp CENTERED RESIZE16

RETURN NIL


FIVEWIN 2.7 FOR XHARBOUR 0.99.61
João Santos - São Paulo - Brasil
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

on my pc not run ok
when I open the dialog I see the group but i not see the gets
Image

Regards,
Best Regards, Saludos

Falconi Silvio
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Post by karinha »

//-> Change in your class GROUP.PRG

#define WM_UPDATEUISTATE 296 // 0x0128
João Santos - São Paulo - Brasil
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Post by karinha »

//-> Change in your class GROUP.PRG

METHOD HandleEvent( nMsg, nWParam, nLParam ) CLASS TGroup

local nResult

if ::lDrag .and. nMsg == WM_NCHITTEST // To have a standard behavior on Clicks
return DefWindowProc( ::hWnd, nMsg, nWParam, nLParam )
endif

if nMsg == WM_UPDATEUISTATE // Groups and contained controls were erased when pressing ALT
nResult = Super:HandleEvent( nMsg, nWParam, nLParam )
::oWnd:Refresh()
return nResult
endif

return Super:HandleEvent( nMsg, nWParam, nLParam )
João Santos - São Paulo - Brasil
User avatar
karinha
Posts: 4882
Joined: Tue Dec 20, 2005 7:36 pm
Location: São Paulo - Brasil

Post by karinha »

//-> Change in your class GROUP.PRG

METHOD Colors( hDC ) CLASS TGroup

DEFAULT ::nClrText := GetTextColor( hDC ),;
::nClrPane := GetBkColor( hDC ),;
::oBrush := TBrush():New( , ::nClrPane )

SetTextColor( hDC, ::nClrText )
SetBkColor( hDC, ::nClrPane )

if ::oBrush:hBitmap != nil
SetBrushOrgEx( hDC, ::nLeft(), nBmpHeight( ::oBrush:hBitmap ) - ::nTop )
endif

return ::oBrush:hBrush

//-> RECOMPILE YOUR FIVEHX.LIB

Regards, saludos.
João Santos - São Paulo - Brasil
User avatar
Maurilio Viana
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil
Contact:

Post by Maurilio Viana »

Silvio, I download your sample and in RC file I saw you define
GroupBox after EditText. Change your tab order to create groupbox first, or change your .rc file to:

Code: Select all

test DIALOG 160, 90, 283, 209
STYLE DS_MODALFRAME | WS_POPUP | WS_VISIBLE | WS_CAPTION
CAPTION "test trasparent"
FONT 8, "MS Sans Serif"
{
 GROUPBOX "I want be trasparent", 51, 4, 127, 277, 66, BS_GROUPBOX
 LTEXT "Value:", -1, 9, 166, 24, 8
 EDITTEXT 117, 38, 164, 239, 12
}
brick3 BITMAP "d48.bmp"
Try this and let us know if worked.

Regards from Brazil
Maurilio
User avatar
Silvio
Posts: 3107
Joined: Fri Oct 07, 2005 6:28 pm
Location: Teramo,Italy

Post by Silvio »

DEAR Maurilio Viana

YOU' RE A GURUUUUUU very much !!!

look at :http://hyperupload.com/download/0230d88 ... r.zip.html
Best Regards, Saludos

Falconi Silvio
User avatar
Maurilio Viana
Posts: 252
Joined: Tue Oct 25, 2005 2:48 pm
Location: Garça/Garza/Heron City - Brazil
Contact:

Post by Maurilio Viana »

Silvio,

I'm happy to know it worked fine :D

Best regards
Maurilio
Post Reply