Page 1 of 1

trasparent error in dialog

Posted: Wed Aug 23, 2006 1:14 pm
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,

Re: trasparent error in dialog

Posted: Wed Aug 23, 2006 4:44 pm
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

Posted: Thu Aug 24, 2006 3:27 pm
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,

Posted: Thu Aug 24, 2006 4:03 pm
by karinha
//-> Change in your class GROUP.PRG

#define WM_UPDATEUISTATE 296 // 0x0128

Posted: Thu Aug 24, 2006 4:04 pm
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 )

Posted: Thu Aug 24, 2006 4:05 pm
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.

Posted: Thu Aug 24, 2006 4:31 pm
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

Posted: Thu Aug 24, 2006 4:54 pm
by Silvio
DEAR Maurilio Viana

YOU' RE A GURUUUUUU very much !!!

look at :http://hyperupload.com/download/0230d88 ... r.zip.html

Posted: Fri Aug 25, 2006 1:45 pm
by Maurilio Viana
Silvio,

I'm happy to know it worked fine :D

Best regards
Maurilio