UNA SOBRE BRUSH

UNA SOBRE BRUSH

Postby mantonio_08 » Mon Feb 08, 2010 7:09 pm

tengo la siguiente DUDA::

DEFINE WINDOW oWnd BRUSH oBrush

como se podria cambiar el oBrush de esta ventana principal en tiempo de ejecucion..

oBrush es un file .bmp

Gracias..
mantonio_08
 
Posts: 330
Joined: Fri May 25, 2007 9:06 pm

Re: UNA SOBRE BRUSH

Postby Bayron » Mon Feb 08, 2010 8:17 pm

Mantonio,
Yo apenas estoy apenas aprendiendo a programar, pero talvez funcionaria:

oBrush:cBmpFile := new.bmp
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: UNA SOBRE BRUSH

Postby Bayron » Mon Feb 08, 2010 11:31 pm

=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: UNA SOBRE BRUSH

Postby Antonio Linares » Tue Feb 09, 2010 1:07 am

Mantonio,

Code: Select all  Expand view

local oBrush1, oBrush2

DEFINE BRUSH oBrush1 FILENAME "test1.bmp"

DEFINE BRUSH oBrush2 FILENAME "test2.bmp"

DEFINE WINDOW oWnd BRUSH oBrush1

...

oWnd:SetBrush( oBrush2 )
oWnd:Refresh()
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41321
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: UNA SOBRE BRUSH

Postby mantonio_08 » Sat Feb 13, 2010 2:23 pm

MASTER ANTONIO..

COMO APLICO EN TIEMPO DE EJECUCION EL CAMBIO DE BRUSH Q DESEO HACER.. lo he puesto en ON PAINT de la ventana principal.. y no corre..

como y dnd habria q aplicarlo::

GRACIAS
mantonio_08
 
Posts: 330
Joined: Fri May 25, 2007 9:06 pm

Re: UNA SOBRE BRUSH

Postby Bayron » Sat Feb 13, 2010 5:18 pm

Mantonio,

Code: Select all  Expand view

DEFINE BRUSH oBrush FILE ltrim(RUTA+'\tapiz\mar1.bmp')
 

Ventanaprin:bPainted := {|hDC| PalBmpDraw( hDC, 40, 0, oBrush:hBitmap,, Ventanaprin:nWidth, Ventanaprin:nHeight,, .T.) }

 


y desde la funcion con la que cambies el tapiz, vuelve a difinir el Brush con el mismo nombre:

Code: Select all  Expand view

DEFINE BRUSH oBrush FILE ltrim(RUTA+'\tapiz\mar2.bmp')
 
Last edited by Bayron on Sat Feb 13, 2010 5:58 pm, edited 1 time in total.
=====>

Bayron Landaverry
(215)2226600 Philadelphia,PA, USA
+(502)46727275 Guatemala
MayaBuilders@gMail.com

FWH12.04||Harbour 3.2.0 (18754)||BCC6.5||UEstudio 10.10||
Windows 7 Ultimate

FiveWin, One line of code and it's done...
User avatar
Bayron
 
Posts: 815
Joined: Thu Dec 24, 2009 12:46 am
Location: Philadelphia, PA

Re: UNA SOBRE BRUSH

Postby Antonio Linares » Sun Feb 14, 2010 7:06 pm

Teniendo el nuevo brush creado, puedes llamar a este código desde donde desees:
Code: Select all  Expand view

oWnd:SetBrush( oBrush2 )
oWnd:Refresh()
 
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 41321
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: UNA SOBRE BRUSH

Postby QAZWSX2K » Mon Feb 15, 2010 1:46 am

no va en el activate como on paint, va sencillamente al definir la ventana, luego si se cambia en tiempo de ejecucion seria como en una funcion algo asi:

dire= GETENV("USERPROFILE")+"\Mis documentos\Mis imágenes"
gcFile:= cGetFile32( "BITMAP (*.bmp)| *.bmp|" , "Seleccione un archivo de Imagen",3, dire)
DEFINE BRUSH dibujo file GCFILE
owindows:oBRUSH(dibujo)
owindows:refresh()

y por supuesto las respectivas validaciones de si selecciono un archivo, etc,etc
Software especializado para oficinas contables con grandes volumenes de Informacion
Impresion de todos los formularios del Seniat, Dian

alex_patino74@hotmail.com
whatsapp 57+3214777217
User avatar
QAZWSX2K
 
Posts: 363
Joined: Tue Oct 25, 2005 7:06 pm
Location: Bogota - Caracas


Return to FiveWin para Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 14 guests