FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin para Harbour/xHarbour trasparent error in dialog
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
trasparent error in dialog
Posted: Wed Aug 23, 2006 01:14 PM

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
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
Re: trasparent error in dialog
Posted: Wed Aug 23, 2006 04:44 PM
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 - Phone: +55(11)95150-7341
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
trasparent error in dialog
Posted: Thu Aug 24, 2006 03:27 PM
on my pc not run ok
when I open the dialog I see the group but i not see the gets


Regards,
Best Regards, Saludos



Falconi Silvio
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
trasparent error in dialog
Posted: Thu Aug 24, 2006 04:03 PM

//-> Change in your class GROUP.PRG

define WM_UPDATEUISTATE 296 // 0x0128

João Santos - São Paulo - Brasil - Phone: +55(11)95150-7341
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
trasparent error in dialog
Posted: Thu Aug 24, 2006 04:04 PM

//-> 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 - Phone: +55(11)95150-7341
Posts: 8523
Joined: Tue Dec 20, 2005 07:36 PM
trasparent error in dialog
Posted: Thu Aug 24, 2006 04:05 PM

//-> 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 - Phone: +55(11)95150-7341
Posts: 252
Joined: Tue Oct 25, 2005 02:48 PM
trasparent error in dialog
Posted: Thu Aug 24, 2006 04:31 PM
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:

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
Posts: 3107
Joined: Fri Oct 07, 2005 06:28 PM
trasparent error in dialog
Posted: Thu Aug 24, 2006 04:54 PM

DEAR Maurilio Viana

YOU' RE A GURUUUUUU very much !!!

look at :http://hyperupload.com/download/0230d88831/printbar.zip.html

Best Regards, Saludos



Falconi Silvio
Posts: 252
Joined: Tue Oct 25, 2005 02:48 PM
trasparent error in dialog
Posted: Fri Aug 25, 2006 01:45 PM

Silvio,

I'm happy to know it worked fine :D

Best regards
Maurilio

Continue the discussion