nageswaragunupudi wrote:Have you noticed any other issues?
if ::lTransparent
SetBkMode( hDC, 1 ) // TRANSPARENT
if IsAppThemed()
if ! Empty( ::oWnd:oBrush ) //.and. ! Empty( ::oWnd:oBrush:hBitmap ) .and. ! ::IsKindOf( "TGROUP" )
::PaintBack( hDC )
else
if Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO;TGROUP"
// Without the above IF condition, says with border in themed apps
// on transparent dialogs with solid color background
// are not painted correctly. With each click of checkbox / radio
// border and say text are overpainted one pixel down & one pixel right
//DrawPBack( ::hWnd, hDC )
ParentImage( ::hWnd, hDC )
endif
endif
endif
else
if IsAppThemed() .and. Upper( ::ClassName() ) $ "TCHECKBOX;TRADIO;TGROUP"
DrawPBack( ::hWnd, hDC )
endif
endif
case nMsg == WM_LBUTTONDOWN
// if ::lTransparent .and. ( ::IsKindOf( "TRADIO" ) .or. ::IsKindOf( "TCHECKBOX" ) )
// ::oWnd:Refresh( .f. )
// aeval(::oWnd:aControls,{|o|if(o:ClassName() == "TSAY",o:refresh(),)})
// ::oWnd:Refresh() // RevBuild 11.07: Refresh(.f.) replaced to avoid overpainting of says
// endif
return ::LButtonDown( nHiWord( nLParam ), nLoWord( nLParam ), nWParam )
case nMsg == WM_LBUTTONUP
// if ::lTransparent .and. ( ::IsKindOf( "TRADIO" ) .or. ::IsKindOf( "TCHECKBOX" ) )
// ::oWnd:Refresh( .f. ) // EMG commented out to avoid flicker
// endif
return ::LButtonUp( nHiWord( nLParam ), nLoWord( nLParam ), nWParam )
case nMsg == WM_UPDATEUISTATE // buttons, radios and checkboxes were erased when pressing ALT
nResult = Super:HandleEvent( nMsg, nWParam, nLParam )
if ::lTransparent //.and. ( ::IsKindOf( "TRADIO" ) .or. ::IsKindOf( "TCHECKBOX" ) )
::oWnd:Refresh( .F. )
endif
return nResult
endcase
METHOD PaintBack( hDC ) CLASS TControl
local uVal := 0
local oRect, oParent, oBrush
local nOrgX := 0, nOrgY := 0
if ::lTransparent
oParent := ::oWnd
nOrgX := -::nLeft
nOrgY := -::nTop
endif
oRect := ::GetCliRect()
oBrush := IfNil( oParent, Self ):oBrush
oBrush:Resize( IfNil( oParent, Self ), @nOrgX, @nOrgY )
SetBrushOrgEx( hDC, nOrgX, nOrgY )
FillRect( hDC, oRect:aRect, oBrush:hBrush )
return uVal
case cBmpRes != nil
::hBitmap = LoadBitmap( GetResources(), cBmpRes )
::hBrush = If( ::hBitmap != 0, CreatePatternBrush( ::hBitmap ),)
if ! Empty( cResName )
aBmpPal = PalBmpLoad( cResName )
::hBitmap = aBmpPal[ 1 ]
::hPalette = aBmpPal[ 2 ]
LANGUAGE LANG_NEUTRAL, SUBLANG_NEUTRAL
DLG_PRODUCTOE DIALOG 59, 60, 305, 190
STYLE DS_3DLOOK | DS_MODALFRAME | DS_SETFONT | WS_CAPTION | WS_VISIBLE | WS_POPUP | WS_SYSMENU
CAPTION "Datos Generales"
FONT 9, "MS Sans Serif"
{
GROUPBOX "", -1, 4, 3, 297, 57
LTEXT "Código:", -1, 9, 12, 41, 12, SS_LEFT
EDITTEXT 101, 53, 12, 58, 12, ES_AUTOHSCROLL
LTEXT "Unidad de medida:", -1, 165, 12, 73, 12, SS_LEFT
EDITTEXT 102, 240, 12, 54, 12, ES_AUTOHSCROLL
LTEXT "Nombre:", -1, 9, 26, 41, 12, SS_LEFT
EDITTEXT 103, 53, 26, 241, 12, ES_AUTOHSCROLL
LTEXT "Familia:", -1, 9, 39, 41, 12, SS_LEFT
COMBOBOX 104, 53, 40, 241, 98, WS_TABSTOP | WS_VSCROLL | CBS_DROPDOWNLIST | CBS_DISABLENOSCROLL
GROUPBOX "Precio, Impuesto y existencia", -1, 4, 62, 297, 46
LTEXT "Precio U$:", -1, 11, 72, 60, 12, SS_LEFT
EDITTEXT 105, 74, 72, 64, 12, ES_RIGHT
LTEXT "Tasa de IVA %:", -1, 11, 87, 60, 12, SS_LEFT
EDITTEXT 106, 74, 87, 64, 12, ES_RIGHT
GROUPBOX "", -1, 161, 62, 140, 46
LTEXT "Precio Final U$:", -1, 169, 72, 55, 12, SS_LEFT
EDITTEXT 107, 227, 72, 63, 12, ES_RIGHT
LTEXT "Existencia:", -1, 169, 87, 55, 12, SS_LEFT
EDITTEXT 108, 227, 87, 63, 12, ES_RIGHT
GROUPBOX "Notas:", -1, 4, 109, 297, 60
EDITTEXT 109, 11, 119, 285, 46, WS_VSCROLL | ES_AUTOVSCROLL | ES_MULTILINE
PUSHBUTTON "&Grabar", 201, 193, 173, 50, 14
PUSHBUTTON "&Salir", 202, 252, 173, 50, 14
}
PROCEDURE Productos_Editar( lNuevo )
PRIVATE lContinuar := FALSE
PRIVATE oDlgE
PRIVATE oCod, cCod, cNom, cFam, cUni, nPre, nIva, nPFV, nExi, oPVF, cNotas
/*si es nuevo registro*/
IF lNuevo
/*inicializa variables*/
cCod := StrZero( CTRL->NUMPROD + 1, 6 )
cNom := Space( 50 )
cFam := Space( 50 )
cUni := PadR("UNIDAD",10)
nPre := 0
nIva := _TASAIVA_
nPFV := 0
nExi := 0
cNotas := ""
ELSE
/*verifica si tabla esta vacia*/
IF PROD->( Eof() )
RETURN
ENDIF
/*toma datos de tabla*/
cCod := PROD->CODIGO
cNom := PROD->NOMBRE
cFam := PROD->FAMILIA
cUni := PROD->MEDIDA
nPre := PROD->PRECIO
nIva := PROD->IVA
nPFV := PROD->PFV
nExi := PROD->EXISTEN
cNotas := PROD->NOTAS
ENDIF
/*define dialogo*/
DEFINE DIALOG oDlgE NAME "DLG_PRODUCTOE" OF oDlg ICON GetIcon() FONT oFont
/*redefine controles*/
REDEFINE GET oCod VAR cCod;
ID 101 OF oDlgE;
WHEN FALSE
REDEFINE GET cUni;
ID 102 OF oDlgE;
PICTURE "@!";
VALID Validar_NoVacio( cUni, "Defina unidad de medida del producto!" )
REDEFINE GET cNom;
ID 103 OF oDlgE;
PICTURE "@!S80";
VALID Validar_NoVacio( cNom, "Defina nombre del producto!" )
REDEFINE DBCOMBO cFam;
ID 104 OF oDlgE;
ALIAS "FAMI";
ITEMFIELD "NOMBRE";
LISTFIELD "NOMBRE";
ORDER "NOMBRE";
VALID Validar_NoVacio( cFam, "Defina una familia para el producto!" )
REDEFINE GET nPre;
ID 105 OF oDlgE;
PICTURE "99,999.99";
VALID nPre >= 0;
ON CHANGE ( ::Assign(), nPFV := nPre + (nPre*(nIva/100)), oPVF:refresh() )
REDEFINE GET nIva;
ID 106 OF oDlgE;
PICTURE "99.99";
VALID nIva >= 0;
ON CHANGE ( ::Assign(), nPFV := nPre + (nPre*(nIva/100)), oPVF:refresh() )
REDEFINE GET oPVF VAR nPFV;
ID 107 OF oDlgE;
PICTURE "99,999.99";
VALID nPFV >= 0
REDEFINE GET nExi;
ID 108 OF oDlgE;
PICTURE "999,999";
WHEN FALSE
REDEFINE GET cNotas;
ID 109 OF oDlgE;
MEMO COLOR CLR_BLUE, CLR_SOFTYELLOW
REDEFINE BUTTON;
ID 201 OF oDlgE;
ACTION IIf( Productos_Grabar( lNuevo ) .AND. ! lContinuar, oDlgE:END(), NIL );
WHEN !( empty(cUni) .or. empty(cNom) .or. empty(cFam) .or. nPre <= 0 )
REDEFINE BUTTON;
ID 202 OF oDlgE;
ACTION oDlgE:END();
CANCEL
/*activa dialogo*/
ACTIVATE DIALOG oDlgE CENTER
/*da foco al browse*/
oBrw:SetFocus()
RETURN
carlos vargas wrote:thanks antonio
please you can see this issuse:
viewtopic.php?f=6&t=22142
the definue brush and redefine bitmap fail with xhb.com and fwh 11.03
you can try examples testxbrw.prg in samples folder in fwh, the backgroun bitmap is no show, see the screenshot.
in brush.prg in METHOD New ::hBitmap return zero.
- Code: Select all Expand view
case cBmpRes != nil
::hBitmap = LoadBitmap( GetResources(), cBmpRes )
::hBrush = If( ::hBitmap != 0, CreatePatternBrush( ::hBitmap ),)
in bitmap.prg in METHOD LoadImage, ::hBitmap and ::hPalette return zero
- Code: Select all Expand view
if ! Empty( cResName )
aBmpPal = PalBmpLoad( cResName )
::hBitmap = aBmpPal[ 1 ]
::hPalette = aBmpPal[ 2 ]
salu2
carlos vargas
Return to FiveWin for Harbour/xHarbour
Users browsing this forum: Google [Bot] and 111 guests