topic
stringlengths 1
63
| text
stringlengths 1
577k
⌀ |
|---|---|
Brush en Browse
|
[quote="Francisco Horta":syyabk5y]Parece que ya solucioné modificando la clase Destroy() de la xbrowse agregando estas lineas,
if ::oBrush:hBitmap != 0 .and. ValType( ::oBrush:Cargo ) == 'N'
DeleteObject( ::oBrush:hBrush )
endif
nomas que lo confirme Antonio a ver si es correcto
saludos
paco[/quote:syyabk5y]
Paco,
La forma correcta sería:
[code=fw:syyabk5y]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> != <span style="color: #000000;">0</span> .and. ValType<span style="color: #000000;">(</span> ::<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">Cargo</span> <span style="color: #000000;">)</span> == <span style="color: #ff0000;">'N'</span><br /> ::<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> </div>[/code:syyabk5y]
puesto que los brushes en FWH son reusables desde distintos objetos, y no podemos destruirlos directamente pues pueden estar aun en uso
|
Brush en Browse
|
[quote="FranciscoA":24kkchw3]
Estos no los elimina:
DEFINE BRUSH oBrush FILENAME cBrush
DEFINE FONT oFont NAME "MS SANS SERIF" SIZE 0, -10 BOLD
DEFINE FONT oFont2 NAME "MS SANS SERIF" SIZE 0, -14 BOLD
oBrw:SetBackGround(".\STONE.BMP")
Al salir, hago esto:
oFont:End() //esta no la elimina
oFont2:End() //esta SI
oBrush:End() //este tampoco
[/quote:24kkchw3]
Paco,
Si no se eliminan es porque se han asignado más veces de las debidas y su contador de uso no está a 1. Lo puedes comprobar llamando varias veces a :End():
[code=fw:24kkchw3]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> <span style="color: #00C800;">while</span> oFont:<span style="color: #000000;">nCount</span> > <span style="color: #000000;">0</span><br /> oFont:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> end<br /><br /> <span style="color: #00C800;">while</span> oBrush:<span style="color: #000000;">nCount</span> > <span style="color: #000000;">0</span><br /> oBrush:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> end<br /> </div>[/code:24kkchw3]
|
Brush en Browse
|
Antonio,
Gracias por tu apoyo..
probando la clase tfolderex de mi sistema le asigno font y estas se quedaban en memoria
lo soluciones corrigiendo el metodo Destroy()
METHOD Destroy() INLINE AEval( ::aBitmaps, {| hBmp, nId | DeleteObject( hBmp[ BMP_HANDLE] ) } ), ;
AEval( ::aBrightBmp, {| hBmp, nId | DeleteObject( hBmp ) } ), [color=#BF0000:1rq5goko]::oFont:End()[/color:1rq5goko], Super:Destroy()
Es correcto?
gracias
paco
|
Brush en Browse
|
Antonio,
¿ Podrías, por favor, decirme qué significa "más veces de las debidas" en:
[quote="Antonio Linares":3j0yfotj]
Si no se eliminan es porque se han asignado más veces de las debidas...
[/quote:3j0yfotj] ?
Saludos
|
Brush en Pages
|
Buen día,Pretendo usar Pages en mi aplicación pero me encuentro que no puedo colocar un brush a los mismos.Hice todo lo que ví comentado en el foro pero sigue saliendo con el fondo blanco.Como uso recursos DLL generados con Pelles-C, y este no tiene predefinido el Pages, lo defino como texto. Calculo que ahí está el fallo pero quisiera saber si realmente no se puede definir el brush en Pages o es fallo de la definición de recursos. Si el fallo estuviese en la definición del recurso, les pido que me hagan saber cual es la línea de definición para los Pages, ya que tengo un soft free que permite editar las DLL como si fuesen RC y con ello podría cambiarle esta línea.Gracias. Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Brush en Pages
|
Rolando,Cada página del control TPages es un diálogo, por lo que podrías asignarle el brush a cada uno de ellos:AEval( oPages:aDialogs, { | oDlg | oDlg:SetBrush( oBrush ), oDlg:Refresh() } )
|
Brush en Pages
|
Antonio,Gracias por responder, pero no funciona, sigue igual.Lo solucioné poniendo un say que cubra todo en cada dialog de la Pages. Lo definí como NO Transparente y, al resto de los controles los definí como transparentes. Luego :oPages:aDialogs[1]:SetBrush( oBrush1) oPages:aDialogs[1]:lTransparent := .t.y lo mismo para cada una de los dialogs de la Pages.Como el fondo del brush si salía, el say que ocupa todo el dialog hace que se muestre un fondo perfecto.Gracias.Rolando <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Brush en TDockPnel
|
Cristóbal buenas tardes, que pena molestar.
Pero quería saber si se puede usar una imagen "brush" como fondo en un panel de tu clase.
De antemano gracias.
|
Brush en TDockPnel
|
Leandro, no es molestia. Es muy sencillo
[code=fw:2aq1cyqy]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> :<span style="color: #000000;">SetCtrlsPnel</span><span style="color: #000000;">(</span> <span style="color: #000000;">{</span> | o, nT, nL, nH, nW, nR | o:<span style="color: #000000;">SetBrush</span><span style="color: #000000;">(</span> oBrush <span style="color: #000000;">)</span>, ;<br /> XBrowsePnel<span style="color: #000000;">(</span> o, cArt, nR + <span style="color: #000000;">110</span>, nL, nH - <span style="color: #000000;">158</span>, nW <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> :<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> </div>[/code:2aq1cyqy]
|
Brush en TDockPnel
|
Amigo, muchas gracias por responder.
Funciona de maravilla, era lo que necesitaba.
Pero ahora me surge otra pregunta <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Puedo también emular de alguna manera el ON INIT de un dialogo, en un TDockPnel?
De antemano gracias.
|
Brush en TDockPnel
|
Leandro, prueba con esto a ver
[code=fw:1syh55js]<div class="fw" id="{CB}" style="font-family: monospace;"><br /> :<span style="color: #000000;">SetCtrlsPnel</span><span style="color: #000000;">(</span> <span style="color: #000000;">{</span> | o, nT, nL, nH, nW, nR | o:<span style="color: #000000;">bInit</span> := <span style="color: #000000;">{</span> || MyFunction<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">}</span>, ;<br /> XBrowsePnel<span style="color: #000000;">(</span> o, cArt, nR + <span style="color: #000000;">110</span>, nL, nH - <span style="color: #000000;">158</span>, nW <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /><br /> :<span style="color: #0000ff;">Activate</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> </div>[/code:1syh55js]
|
Brush en dialog con page
|
Una preguntilla....
Tengo una dialog dentro de una función que se define así:
[code:o1qfs0ca]
DEFINE DIALOG oDlg RESOURCE "DLG_PAGE" TITLE cTitulo
REDEFINE SAY oSay[1] PROMPT cId ID 200 OF oDlg
REDEFINE SAY oSay[2] PROMPT cTexto ID 201 OF oDlg
REDEFINE PAGES oPage ID 102 OF oDlg DIALOGS cDlg_Hija
[/code:o1qfs0ca]
La función siempre me ha funcionado perfecto, pero cuando intento hacer que la dialog aparezca transparente si le paso un brush a la función y que tome ese brush en la dialog y en la page, haciendo esto:
[code:o1qfs0ca]
IF oBrush != NIL
oDlg:lTransparent := .t.
oPage:aDialogs[1]:lTransparent := .t.
oDlg:oBrush := oBrush
oPage:aDialogs[1]:oBrush := oBrush
oPage:aDialogs[1]:Refresh()
ENDIF
[/code:o1qfs0ca]
Me pone transparente la dialog pero no la dialog en el page, como puedo solucionarlo para que pueda verse todo con el mismo brush?
se ve así
[url=http://img80.imageshack.us/my.php?image=dibujopb1.jpg:o1qfs0ca][img:o1qfs0ca]http://img80.imageshack.us/img80/2620/dibujopb1.th.jpg[/img:o1qfs0ca][/url:o1qfs0ca]
Gracias desde ya por la ayuda que puedan darme
|
Brush en dialog con page
|
Hola Jose
Prueba asi :
oPage:aDialogs[1]:SetBruhs( oBrush )
oPage:aDialogs[1]:lTransparent := .t.
Saludos
|
Brush en dialog con page
|
[quote="Raymundo Islas M.":1yig30zt]Hola Jose
Prueba asi :
oPage:aDialogs[1]:SetBruhs( oBrush )
oPage:aDialogs[1]:lTransparent := .t.
Saludos[/quote:1yig30zt]
Gracias Ray por tu respuesta, lo probé así:
[code:1yig30zt]
IF oBrush != NIL
oDlg:lTransparent := .t.
oPage:lTransparent := .t.
oPage:aDialogs[1]:lTransparent := .t.
oDlg:SetBrush(oBrush)
oPage:SetBrush(oBrush)
oPage:aDialogs[1]:SetBrush( oBrush )
oDlg:Refresh()
oPage:Refresh()
oPage:aDialogs[1]:Refresh()
ENDIF
[/code:1yig30zt]
Pero con el mismo resultado
recibo cualquier sugerencia del foro, porfis <!-- s:cry: --><img src="{SMILIES_PATH}/icon_cry.gif" alt=":cry:" title="Crying or Very sad" /><!-- s:cry: -->
|
Brush en dialog con page
|
[code:1czqy6j1]
LOCAL oBrush
DEFINE BRUSH oBrush FILE "MIBITMAP.BMP"
DEFINE DIALOG oDlg RESOURCE "DLG_PAGE" TITLE cTitulo ;
BRUSH oBrush TRANSPARENT
[/code:1czqy6j1]
|
Brush en dialog con page
|
Jose, tienes razon.
Algo esta pasando, el codigo que te mande funciona correctamente en la version anterior que usaba ( 2.7 ), estoy probando el nuevo update ( 7.10) y mis pantallas perdieron la transparencia en los pages.
Mira :
Antes
[img:904t2k8m]http://img229.imageshack.us/img229/7850/scrtrnsokyv2.jpg[/img:904t2k8m]
Despues
[img:904t2k8m]http://img229.imageshack.us/img229/7017/scrtransdg8.jpg[/img:904t2k8m]
A ver que pudiera decir Antonio al respecto.
Saludos
|
Brush en dialog con page
|
Con la 7.01 es lo mismo que es la que yo tengo.
Antonio,
Alguna solución?
|
Brush en dialog con page
|
Raymundo,
Puedes por favor comparar el código fuente de TPages en la 2.7 y en la 7.10 ? gracias
|
Brush en dialog con page
|
Master Antonio :
Existe una Linea con diferencias en el Metodo Redefine :
En la version 2.7 esta asi :
DEFAULT nOption := 1, oFont := ::GetFont()
y en la 7.10 :
DEFAULT nOption := 1, oWnd := GetWndDefault(), oFont := ::GetFont()
Espero te sirva.
Saludos
|
Brush en dialog con page
|
Raymundo,
Gracias. Es lo que suponía: no hay cambios en TPages.
Puedes probar a quitar el cero que añadimos en window.prg en el método EndPaint() y probar tu aplicación ? gracias,
[code:7ma71wuj]
METHOD EndPaint() INLINE ::nPaintCount--,;
EndPaint( ::hWnd, ::cPS ), ::cPS := nil, ::hDC := nil // , 0
[/code:7ma71wuj]
|
Brush en dialog con page
|
Antonio
Sigue igual, pero ahora perdi el look 2007 en el menu, la barra de mensajes sigue bien.
Ahora, me estoy dando cuenta de algo :
Para dar la apariencia XP estoy usando un archivo con el mismo nombre del ejecutable p.e. MiApp.EXE.Manifest si esta "activo" es cuando veo un desastre en las pantallas,si lo renombro ya no se ven los problemas (brush de fondo y transparencias ), pero pierdo lo agradable de la apariencia.
Saludos
|
Brush en dialog con page
|
[quote="Raymundo Islas M.":cwqd46gm]Antonio
Sigue igual, pero ahora perdi el look 2007 en el menu, la barra de mensajes sigue bien.
Ahora, me estoy dando cuenta de algo :
Para dar la apariencia XP estoy usando un archivo con el mismo nombre del ejecutable p.e. MiApp.EXE.Manifest si esta "activo" es cuando veo un desastre en las pantallas,si lo renombro ya no se ven los problemas (brush de fondo y transparencias ), pero pierdo lo agradable de la apariencia.
Saludos[/quote:cwqd46gm]
Antonio,
Utilizo la versión 7.01, que creo fué la primera con transparencia y allí en la clase twindow no está el cero referido, y presenta la falla.
Incluso hay un topico mío por enero 2007 referido a ese problema con las pages en el foro, que no fué respondido.
Pienso que los tiros deben venir por otro lado...
|
Brush in 8.12 Window
|
I assign a Brush to the main window of my application. The window is opened to a defined size. If my client clicked on the Maximize button, in the past the BMP would simply stretch to the size of the window as displayed on the full monitor. In 8.12, it now gets a "tiled" look where the original brush covers about 60% of the window, and then paints a second copy in the remainder.
The code to apply the brush is:
DEFINE BRUSH owBrush RESOURCE "WINBACK"
...
oWnd:oBrush := owBrush
WINBACK is a .bmp file in the resource.
Is there a way to get the stretched bitmap back ?
|
Brush in 8.12 Window
|
Hello Tim,
I understand, that You are using a Image as a Background.
It doesn't matter, if it comes as a file from disk, or from resource.
Both solutions : Fill background with a Image or Tiled.
[code=fw:s3d6kk4m]<div class="fw" id="{CB}" style="font-family: monospace;"><br />....<br />....<br /><span style="color: #B900B9;">// Brush Image</span><br /><span style="color: #B900B9;">// --------------</span><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> WL_IMAGE<span style="color: #000000;">(</span> hDC, oWnd <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">// Brush Image Tiled</span><br /><span style="color: #B900B9;">// ---------------------</span><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd1 <span style="color: #0000ff;">MAXIMIZED</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> WB_IMAGE<span style="color: #000000;">(</span> oWnd <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//--------- IMAGE - Background ------------------------ </span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> WL_IMAGE<span style="color: #000000;">(</span> hDC, oWnd <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">LOCAL</span> oImage<br /><span style="color: #00C800;">LOCAL</span> nWidth := oWnd:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> nHeight := oWnd:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">// Selected Image ( W_LOGO is a BMP-file from disk )</span><br /><span style="color: #B900B9;">// ------------------------------------------------------------</span><br />cNEWLOGO := <span style="color: #ff0000;">"&c_pfad<span style="color: #000000;">\I</span>MAGES<span style="color: #000000;">\"</span> + ALLTRIM(W_LOGO)<br />IF File( "</span>&cNEWLOGO<span style="color: #ff0000;">" )<br /> DEFINE IMAGE oImage FILENAME "</span>&cNEWLOGO<span style="color: #ff0000;">" <br /> PalBmpDraw( hDC, 0, 0, oImage:hBitmap, , nWIDTH, nHEIGHT, , .T. ) <br />ELSE<br /> MsgAlert( "</span>Cannot load : <span style="color: #ff0000;">" + CRLF + ;<br /> cNEWLOGO, "</span>Error<span style="color: #ff0000;">" ) <br />ENDIF<br /><br />RETURN NIL<br /><br />//--------- IMAGE - BRUSH ------------------------ <br /><br />STATIC FUNCTION WB_IMAGE( oWnd ) <br />LOCAL oImage<br /><br />cNEWLOGO := "</span>&c_pfad\<span style="color: #0000ff;">IMAGES</span>\<span style="color: #ff0000;">" + ALLTRIM(B_LOGO) // small BMP 32 x 32<br />IF File( "</span>&cNEWLOGO<span style="color: #ff0000;">" )<br /> DEFINE BRUSH oImage FILE "</span>&cNEWLOGO<span style="color: #ff0000;">"<br /> SET BRUSH OF oWnd TO oImage<br /> RELEASE BRUSH oImage<br />ELSE<br /> MsgAlert( "</span>Cannot load : <span style="color: #ff0000;">" + CRLF + ;<br /> cNEWLOGO, "</span>Error<span style="color: #ff0000;">" ) <br />ENDIF<br /><br />RETURN NIL<br /><br /></span></div>[/code:s3d6kk4m]
Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Brush in 8.12 Window
|
Thank You.
|
Brush in 8.12 Window
|
Hello Uwe,
trying hard to reconstruct your example, but something is wrong, the background is always grey. Here is the source:
[code=fw:3l7vc7eg]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Testen von Hintergrundbildern</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #00C800;">LOCAL</span> oWnd<br /> <span style="color: #00C800;">LOCAL</span> oFont<br /> <span style="color: #00C800;">LOCAL</span> cLogo := <span style="color: #ff0000;">"five.bmp"</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, - <span style="color: #000000;">12</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDI</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Testen von Hintergrundbildern"</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Schriftart setzen</span><br /> <span style="color: #B900B9;">//</span><br /> oWnd:<span style="color: #000000;">setFont</span><span style="color: #000000;">(</span> oFont <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Filename in der Messagebar anzeigen</span><br /> <span style="color: #B900B9;">//</span><br /> SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> cLogo<br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Brush Image</span><br /> <span style="color: #B900B9;">// --------------</span><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> WL_IMAGE<span style="color: #000000;">(</span> oWnd, cLogo <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Brush Image Tiled</span><br /> <span style="color: #B900B9;">// ---------------------</span><br /> <span style="color: #B900B9;">//ACTIVATE WINDOW oWnd1 MAXIMIZED ON PAINT WB_IMAGE( oWnd )</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Aufr„umen</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">FONT</span> oFont<br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//--------- IMAGE - Background ------------------------</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> WL_IMAGE<span style="color: #000000;">(</span> oWnd, cLogo <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> oImage<br /> <span style="color: #00C800;">LOCAL</span> nWidth := oWnd:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> nHeight := oWnd:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <br /> <span style="color: #00C800;">LOCAL</span> hDC := oWnd:<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #B900B9;">// Selected Image ( W_LOGO is a BMP-file from disk )</span><br /> <span style="color: #B900B9;">// ------------------------------------------------------------</span><br /> <span style="color: #00C800;">IF</span> File<span style="color: #000000;">(</span> cLogo <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">IMAGE</span> oImage FILENAME cLogo<br /> PalBmpDraw<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oImage:<span style="color: #000000;">hBitmap</span>, , nWIDTH, nHEIGHT, , .T. <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> MsgAlert<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Cannot load : "</span> + CRLF + cLogo, <span style="color: #ff0000;">"Error"</span> <span style="color: #000000;">)</span> <br /> <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:3l7vc7eg]
Can you help?
|
Brush in 8.12 Window
|
Hello Frank,
another way to display a Background-Image without extra Function :
( Freeimage.dll is used )
[code=fw:hmbbpdgy]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// SIZE can be any value, because it will be adjusted to Window-Size</span><br /><br /><span style="color: #00C800;">IF</span> File<span style="color: #000000;">(</span> <span style="color: #ff0000;">"FANTASY1.jpg"</span> <span style="color: #000000;">)</span><br /> @ <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">IMAGE</span> oImage <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">ADJUST</span><br /> oImage:<span style="color: #0000ff;">Progress</span><span style="color: #000000;">(</span> .f. <span style="color: #000000;">)</span><br /> oImage:<span style="color: #000000;">LoadBmp</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"FANTASY1.JPG"</span> <span style="color: #000000;">)</span> <span style="color: #B900B9;">// Your Image</span><br /><span style="color: #00C800;">ELSE</span><br /> MsgAlert<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Cannot load : "</span> + CRLF + ;<br /> <span style="color: #ff0000;">"FANTASY1.jpg"</span>, <span style="color: #ff0000;">"Error"</span> <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> DRAWBITMAP<span style="color: #000000;">(</span> hDC, oImage:<span style="color: #000000;">hbitmap</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>,; <br /> oWnd:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oWnd:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <br /><br /> </div>[/code:hmbbpdgy]
Another Solution :
[code=fw:hmbbpdgy]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br />...<br /><span style="color: #00C800;">IF</span> File<span style="color: #000000;">(</span> <span style="color: #ff0000;">"FANTASY1.jpg"</span> <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">IMAGE</span> oImage FILENAME <span style="color: #ff0000;">"FANTASY1.jpg"</span><br /><span style="color: #00C800;">ELSE</span><br /> MsgAlert<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Cannot load : "</span> + CRLF + ;<br /> <span style="color: #ff0000;">"FANTASY1.jpg"</span>, <span style="color: #ff0000;">"Error"</span> <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> PalBmpDraw<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oImage1:<span style="color: #000000;">hBitmap</span>, , oWnd:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oWnd:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, , .T. <span style="color: #000000;">)</span> <br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /> </div>[/code:hmbbpdgy]
Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Brush in 8.12 Window
|
Uwe,
thank you very much for the help, both methods are working for me <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
Do you have an explanation why it doesn't work with the function WL_IMAGE()?
|
Brush in 8.12 Window
|
Hello Frank,
Background-defines are working different with MDI-Windows.
If You use MDI, the used Function from above shows a Grey background.
[code=fw:3vdjlvq9]<div class="fw" id="{CB}" style="font-family: monospace;"> <br /><span style="color: #00C800;">LOCAL</span> hDC <span style="color: #B900B9;">// don't forget !</span><br />...<br />...<br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Image-Test"</span> <span style="color: #B900B9;">// MDI ;</span><br /><br />SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Image-Test"</span> ;<br /><span style="color: #0000ff;">CENTERED</span> CLOCK KEYBOARD <span style="color: #000000;">2007</span><br /><br /><span style="color: #B900B9;">// WL_IMAGE - Function works on non MDI-Windows</span><br /><span style="color: #B900B9;">// ----------------------------------------------------------</span><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> WL_IMAGE<span style="color: #000000;">(</span> oWnd, hDC, <span style="color: #ff0000;">"FANTASY1.jpg"</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//--------- IMAGE - Background ------------------------</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> WL_IMAGE<span style="color: #000000;">(</span> oWnd, hDC, cLogo <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> oImage<br /><br /><span style="color: #B900B9;">// Selected Image a BMP-file from disk )</span><br /><span style="color: #B900B9;">// ---------------------------------------------</span><br /><span style="color: #00C800;">IF</span> File<span style="color: #000000;">(</span> cLogo <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">IMAGE</span> oImage FILENAME cLogo<br /> PalBmpDraw<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oImage:<span style="color: #000000;">hBitmap</span>, , oWnd:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oWnd:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, , .T. <span style="color: #000000;">)</span><br /><span style="color: #00C800;">ELSE</span><br /> MsgAlert<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Cannot load : "</span> + CRLF + cLogo, <span style="color: #ff0000;">"Error"</span> <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:3vdjlvq9]
Using a Background-Function in [color=#FF0000:3vdjlvq9]MDI-Window [/color:3vdjlvq9]:
[code=fw:3vdjlvq9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">LOCAL</span> hDC, oImage <span style="color: #B900B9;">// !!!!!</span><br />...<br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Image-Test"</span> <span style="color: #0000ff;">MDI</span> <span style="color: #B900B9;">// !!!!!</span><br /><br /><span style="color: #B900B9;">// the difference, the Image must be defined here !!!!!!!!</span><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">IMAGE</span> oImage FILENAME <span style="color: #ff0000;">"FANTASY1.jpg"</span><br /><br />SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Image-Test"</span> ;<br /><span style="color: #0000ff;">CENTERED</span> CLOCK KEYBOARD <span style="color: #000000;">2007</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> WL_IMAGE<span style="color: #000000;">(</span> oWnd, hDC, oImage, <span style="color: #ff0000;">"FANTASY1.jpg"</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">//--------- IMAGE - Background =>> MDI ------------------------</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> WL_IMAGE<span style="color: #000000;">(</span> oWnd, hDC, oImage, cLogo <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">// Selected Image a BMP-file from disk </span><br /><span style="color: #B900B9;">// -------------------------------------------</span><br /><span style="color: #00C800;">IF</span> File<span style="color: #000000;">(</span> cLogo <span style="color: #000000;">)</span><br /> PalBmpDraw<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oImage:<span style="color: #000000;">hBitmap</span>, , oWnd:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oWnd:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, , .T. <span style="color: #000000;">)</span><br /><span style="color: #00C800;">ELSE</span><br /> MsgAlert<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Cannot load : "</span> + CRLF + cLogo, <span style="color: #ff0000;">"Error"</span> <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:3vdjlvq9]
Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Brush in 8.12 Window
|
Hello Uwe,
THX for your assistance. <!-- s:) --><img src="{SMILIES_PATH}/icon_smile.gif" alt=":)" title="Smile" /><!-- s:) -->
I've made some more testing and here is the working sample for both SDI and MDI:
[code=fw:fs411lp1]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Testing background pictures</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #00C800;">LOCAL</span> oWnd<br /> <span style="color: #00C800;">LOCAL</span> oFont<br /> <span style="color: #00C800;">LOCAL</span> cLogo := <span style="color: #ff0000;">"C:<span style="color: #000000;">\x</span>Harbour<span style="color: #000000;">\F</span>iveWin<span style="color: #000000;">\m</span>y_source<span style="color: #000000;">\f</span>ive.bmp"</span><br /> <span style="color: #00C800;">LOCAL</span> oImage<br /> <span style="color: #00C800;">LOCAL</span> oBrush<br /> <span style="color: #00C800;">LOCAL</span> hDC<br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Background color is white</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #0000ff;">COLOR</span> CLR_WHITE<br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, - <span style="color: #000000;">12</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MDI</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Testing background pictures"</span> <span style="color: #0000ff;">BRUSH</span> oBrush<br /> <span style="color: #B900B9;">//DEFINE WINDOW oWnd TITLE "Testing background pictures" BRUSH oBrush</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Font</span><br /> <span style="color: #B900B9;">//</span><br /> oWnd:<span style="color: #000000;">setFont</span><span style="color: #000000;">(</span> oFont <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Show file name in the Messagebar</span><br /> <span style="color: #B900B9;">//</span><br /> SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> cLogo<br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Returns the current device context, if any or request a new one</span><br /> <span style="color: #B900B9;">//</span><br /> hDC := oWnd:<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Activate the window</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> <span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> WL_IMAGE<span style="color: #000000;">(</span> oWnd, hDC, cLogo <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//ACTIVATE WINDOW oWnd MAXIMIZED ON PAINT WL_IMAGE( oWnd, cLogo )</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> WL_IMAGE<span style="color: #000000;">(</span> oWnd, hDC, cLogo <span style="color: #000000;">)</span><br /><span style="color: #B900B9;">//STATIC FUNCTION WL_IMAGE( oWnd, cLogo )</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Displays centerd background bitmap with scaling factor</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">//LOCAL hDC</span><br /> <span style="color: #00C800;">LOCAL</span> oImage<br /> <span style="color: #00C800;">LOCAL</span> nScaleFactor := <span style="color: #000000;">2</span><br /> <span style="color: #00C800;">LOCAL</span> nHeightBitmap<br /> <span style="color: #00C800;">LOCAL</span> nWidthBitmap<br /> <span style="color: #00C800;">LOCAL</span> nHeightBitmapNew<br /> <span style="color: #00C800;">LOCAL</span> nWidthBitmapNew<br /> <span style="color: #00C800;">LOCAL</span> oRect<br /> <span style="color: #00C800;">LOCAL</span> nRow<br /> <span style="color: #00C800;">LOCAL</span> nCol<br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">//hDC := oWnd:GetDC()</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #00C800;">IF</span> File<span style="color: #000000;">(</span> cLogo <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Doesn't work in MDI</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">//oImage := TBitmap():New(,,,,, cLogo, .T., oWnd,,, .F., .T.,,, .F.,, .F.,, .F. )</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">IMAGE</span> oImage FILENAME cLogo<br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Original size of the bitmap</span><br /> <span style="color: #B900B9;">//</span><br /> nHeightBitmap := nBmpHeight<span style="color: #000000;">(</span> oImage:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">)</span><br /> nWidthBitmap := nBmpWidth<span style="color: #000000;">(</span> oImage:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Window size</span><br /> <span style="color: #B900B9;">//</span><br /> oRect := oWnd:<span style="color: #000000;">GetRect</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Calculate new bitmap size in relation to the window height</span><br /> <span style="color: #B900B9;">//</span><br /> nHeightBitmapNew := <span style="color: #000000;">(</span> oRect:<span style="color: #000000;">nBottom</span> - oRect:<span style="color: #000000;">nTop</span> <span style="color: #000000;">)</span> / nScaleFactor<br /> nWidthBitmapNew := nWidthBitmap * nHeightBitmapNew / nHeightBitmap<br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Control the new bitmap size in relation to the window width</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #00C800;">IF</span> nWidthBitmapNew > <span style="color: #000000;">(</span> oRect:<span style="color: #000000;">nRight</span> - oRect:<span style="color: #000000;">nLeft</span> <span style="color: #000000;">)</span> / nScaleFactor<br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Calculate new bitmap size in relation to the window width</span><br /> <span style="color: #B900B9;">//</span><br /> nWidthBitmapNew := <span style="color: #000000;">(</span> oRect:<span style="color: #000000;">nRight</span> - oRect:<span style="color: #000000;">nLeft</span> <span style="color: #000000;">)</span> / nScaleFactor<br /> nHeightBitmapNew := nHeightBitmap * nWidthBitmapNew / nWidthBitmap<br /> <span style="color: #00C800;">ENDIF</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Calculate the position for centered output</span><br /> <span style="color: #B900B9;">//</span><br /> nRow := <span style="color: #000000;">(</span> oRect:<span style="color: #000000;">nBottom</span> - oRect:<span style="color: #000000;">nTop</span> <span style="color: #000000;">)</span> / <span style="color: #000000;">2</span> - nHeightBitmapNew / <span style="color: #000000;">2</span><br /> nCol := <span style="color: #000000;">(</span> oRect:<span style="color: #000000;">nRight</span> - oRect:<span style="color: #000000;">nLeft</span> <span style="color: #000000;">)</span> / <span style="color: #000000;">2</span> - nWidthBitmapNew / <span style="color: #000000;">2</span><br /> <span style="color: #B900B9;">//</span><br /> <span style="color: #B900B9;">// Display bitmap</span><br /> <span style="color: #B900B9;">//</span><br /> PalBmpDraw<span style="color: #000000;">(</span> hDC, nRow, nCol, oImage:<span style="color: #000000;">hBitmap</span>,, nWidthBitmapNew, nHeightBitmapNew,, .F., <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> MsgAlert<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Cannot load : "</span> + CRLF + cLogo, <span style="color: #ff0000;">"Error"</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span></div>[/code:fs411lp1]
You are right, SDI and MDI are working differently:
- In SDI the background color is white (Default?). In MDI a grey background color comes up, which can be avoided with 'DEFINE BRUSH oBrush COLOR CLR_WHITE'
- In MDI <hDC> must be passed from the calling function, in SDI <hDC> a local call of 'oWnd:GetDC()' is also working
- In SDI you can paint the bitmap by using TBitmap(). I think there is no need to use PalBmpDraw() anymore, but havn't done further tests because I want to use MDI
That's very strange, it seems to be not very consistantly <!-- s:| --><img src="{SMILIES_PATH}/icon_neutral.gif" alt=":|" title="Neutral" /><!-- s:| -->
But the main thing is, that the task is solved and I have a working peace of source code <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Brush in 8.12 Window
|
Hello Tim,
I think maybe [color=#FF0000:3b39xh79]hDC[/color:3b39xh79] is defined a few times without a Release.
You don't need [color=#FF0000:3b39xh79]hDC := oWnd:GetDC() [/color:3b39xh79]to define inside the main-Window
Is that the source, how Your background is defined, calling the Paint-function ?
[code=fw:3b39xh79]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #00C800;">LOCAL</span> hDC <span style="color: #B900B9;">// don't forget !</span><br />...<br />...<br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Image-Test"</span> ;<br /><br />SET <span style="color: #0000ff;">MESSAGE</span> <span style="color: #0000ff;">OF</span> oWnd <span style="color: #0000ff;">TO</span> <span style="color: #ff0000;">"Image-Test"</span> ;<br /><span style="color: #0000ff;">CENTERED</span> CLOCK KEYBOARD <span style="color: #000000;">2007</span><br /><br /><span style="color: #B900B9;">// WL_IMAGE - Function works on non MDI-Windows</span><br /><span style="color: #B900B9;">// ----------------------------------------------------------</span><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">WINDOW</span> oWnd <span style="color: #0000ff;">MAXIMIZED</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> WL_IMAGE<span style="color: #000000;">(</span> oWnd, hDC, <span style="color: #ff0000;">"FANTASY1.jpg"</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//--------- IMAGE - Background ------------------------</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> WL_IMAGE<span style="color: #000000;">(</span> oWnd, hDC, cLogo <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> oImage<br /><br /><span style="color: #B900B9;">// Selected Image a BMP-file from disk )</span><br /><span style="color: #B900B9;">// ---------------------------------------------</span><br /><span style="color: #00C800;">IF</span> File<span style="color: #000000;">(</span> cLogo <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">IMAGE</span> oImage FILENAME cLogo<br /> PalBmpDraw<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oImage:<span style="color: #000000;">hBitmap</span>, , oWnd:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oWnd:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, , .T. <span style="color: #000000;">)</span><br /><span style="color: #00C800;">ELSE</span><br /> MsgAlert<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Cannot load : "</span> + CRLF + cLogo, <span style="color: #ff0000;">"Error"</span> <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:3b39xh79]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Brush in 8.12 Window
|
A strange thing has been happening.
I'm using your original solution ( top of thread ) and it seems to work. However, after awhile using the program, which is all SDI ( Dialogs ), when someone returns to the MAIN( ) window, the background disappears.
There is no persistant pattern that I can identify.
Any thoughts ?
Tim
|
Brush in 8.12 Window
|
LOCAL hDC was not included... we'll see if that improves the situation. Thank you.
|
Brush in dialog problem continues
|
OK ... When using the Brush in Dialog option its nice, except the folders do not show the brush.
Going further, if I use this option, then BMPGET will show a black field with the bitmap, and if I use the bitmap as a button to select a value for the field ( ie. a data lookup option ), then the value cannot be seen because the black bar is still there.
Tim <!-- s:( --><img src="{SMILIES_PATH}/icon_sad.gif" alt=":(" title="Sad" /><!-- s:( -->
|
Brush in dialog problem continues
|
Tim,
Please try samples\TestFldb.prg for a working sample of folders with background bitmapped brushes.
For non standard FWH controls, like the BTNGET you mention, please add its class name in dialog.prg, here:
if ::lTransparent
FixSays( ::hWnd )
AEval( ::aControls,;
{ | o | If( ! Upper( o:ClassName() ) $ ;
"TGET;TMULTIGET;TBTNBMP;TCOMBOBOX;TWBROWSE;TCBROWSE;TXBROWSE;TLISTBOX",;
o:lTransparent := .t.,) } )
endif
Those are the classes names where we don't want transparency.
|
Brush in dialog problem continues
|
OK ... that fixed the GET issue ...
Still no bitmap background on the folders ( see other thread ).
Tim
|
Brush issue
|
I use a brush background on my screens that is a cloud bmp. It has worked fine for a long time.
I was defining the brush each time I defined a dialog, and that seemed like a huge waste. So I declared the brush in the main( ) routine as a public object, and then refer to it with every dialog.
Several of my clients reported a problem where the brush background was not showing up, and thus the transparent dialog was being viewed against the previous screen or window.
I have checked and I never intentionally release the brush.
This seems to have started in 12.05 and may be continuing in 12.06.
It is happening in a couple of screens. It doesn't happen every time, but it happens to the same dialogs when it does occur.
I would appreciate any suggestions.
Tim
|
Brush issue
|
Tim,
maybe test it like :
DEFINE BRUSH oBrush1 COLOR 14853684
[color=#0000FF:383bn7w0]DEFINE BRUSH oBrush2 FILENAME c_path + "\Images\Stone.bmp"[/color:383bn7w0]
// You can test, if the Brush still exists.
// with < oBrush2:End() > You will get a Errormessage from the Dialog !!!
DEFINE DIALOG oDlg1 RESOURCE "Group" TITLE "Dialog-test" FONT oDlgFont ;
PIXEL // TRANSPARENT
..
..
ACTIVATE DIALOG oDlg1 CENTERED ; // NOWAIT ;
[color=#0000FF:383bn7w0]ON INIT IIF( oBrush2:hBitmap != 0, oDlg1:SetBrush( oBrush2 ), MsgAlert( "Brush not defined !", "ERROR" ) )[/color:383bn7w0]
Best Regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
|
Brush issue
|
Tim,
Brushes also use a counter to share them between different objects.
How are you assigning it ? Must use <oObj>:SetBrush( oBrush )
|
Brush issue
|
This is getting urgent
I use one Brush in my system for ALL dialogs.
In the past, I used the following code in every function that had a dialog:
DEFINE BRUSH oBrush RESOURCE "SKY"
DEFINE DIALOG oDlg RESOURCE "PRO100M" BRUSH oBrush TRANSPARENT OF oWnd FONT oWnd:oFont
It seemed silly to constantly redefine oBrush since there was never an alternative brush used on any dialog. SKY is a bitmap ( clouds ) stored in my .res file that is linked to the program.
So, I declared oBrush a public variable in the Main( ) program ( thinking that would make it global ), and in each dialog I eliminated the DEFINE BRUSH statement.
Antonio said to modify the code to use the following:
DEFINE DIALOG oDlg RESOURCE "PRO100M" TRANSPARENT OF oWnd FONT oWnd:oFont
oDlg:SetBrush( oBrush )
So I did that on the major routines where this was happening.
I also tried an alternative where I set the brush to a color rather than to a .bmp resource
It all seems to work fine, but then two clients report after awhile, the brush disappears, and so the top level dialog ( in focus ) is transparent and shows all the text below it !
The only thing in common is both of these clients are using Windows XP.
I cannot duplicate this problem no matter what I try. I did have another person who reported it, but then they said it resolved and I haven't heard from them since.
When it does occur, the only solution is to leave the program and then re-enter it.
PLEASE ... does anyone have a clue ?
Tim
|
Brush issue
|
Tim,
did You test it the way I posted above ?
I never had any problems.
DEFINE DIALOG oDlg RESOURCE "PRO100M" TRANSPARENT OF oWnd FONT oWnd:oFont
[color=#FF0000:3s8s7c0h]// oDlg:SetBrush( oBrush )[/color:3s8s7c0h]
[color=#0000FF:3s8s7c0h]ACTIVATE DIALOG oDlg ;
ON INIT oDlg:SetBrush( oBrush )[/color:3s8s7c0h]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Brush issue
|
I changed it to your style and now its even worse.
I'll have to go back and see what else I can do.
I think I'll revert it back to what I had originally with no problems.
Tim
|
Brush issue
|
Tim,
I don't know, why the brush gets lost.
Another solution could be to define the brush LOCAL :
FUNCTION Main()
LOCAL [color=#FF0000:3jdj2881]oBrush2[/color:3jdj2881]
c_path := GETCURDIR()
DEFINE BRUSH [color=#FF0000:3jdj2881]oBrush2[/color:3jdj2881] FILENAME c_path + "\Images\Stone.bmp"
DEFINE WINDOW oWnd TITLE "Testing Brush
...
...
DEFINE BUTTON oButt1 OF oBar FILE c_path + "\Logo\16x16N.bmp" ;
MESSAGE "Resource" ;
ACTION D_RESOURCE([color=#FF0000:3jdj2881]oBrush2[/color:3jdj2881]) ;
PROMPT "Resource"
ACTIVATE WINDOW oWnd MAXIMIZED
[color=#FF0000:3jdj2881]oBrush2:End()[/color:3jdj2881]
RETURN NIL
// -------------------------
FUNCTION D_RESOURCE([color=#FF0000:3jdj2881]oBrush2[/color:3jdj2881])
LOCAL oDlg1
DEFINE DIALOG oDlg1 RESOURCE "Group" TITLE "Dialog-test" PIXEL TRANSPARENT
ACTIVATE DIALOG oDlg1 CENTERED NOWAIT ;
ON INIT IIF( oBrush2:hBitmap != 0, oDlg1:SetBrush( [color=#FF0000:3jdj2881]oBrush2 [/color:3jdj2881]), MsgAlert( "Brush not defined !", "ERROR" ) )
RETURN NIL
Best Regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
|
Brush issue
|
That is what I'm doing right now. I'll see if that resolves the problem.
Tim
|
Brush issue
|
Antonio,
I just use the BRUSH argument in the REDEFINE for a dialog created in a resource.
|
Brush issue
|
[quote="TimStone":2ig95gpl]SKY is a bitmap ( clouds ) stored in my .res file that is linked to the program.[/quote:2ig95gpl]
Please open the "Memory options" of your bitmap (if you are using BRW) and remove the check from Discardable option.
EMG
|
Brush issue
|
Tim,
Somewhere in your app, your brush counter is decreasing down to zero and so the brush is released.
Please place a log in your app when you return from a certain option and check the brush counter:
LogFile( "brushes.txt", { oBrush:nCounter, "exiting from function ..." } )
As a workaround you could increase the counter: oBrush:nCount++ so it will not reach zero.
|
Brush issue
|
Antonio,
Here is where it gets interesting, and very strange.
I started monitoring oBrush:ncount. I initialize the public object oBrush, then I increment it 5 times, so nCount should be 6. I enter a function, so some work, and come out, and ncount is now 7. No where in that function do I increment oBrush. In fact, I don't reference it in the function, but it still gets incremented. This continues to happen anytime I go into that function.
In that .prg, whcih is rather complex, I create and use a different brush, olbrush which is locally declared for each dialog.
This is getting very strange.
Also, one of the clients having this issues is using an old XP Home edition computer ( in a network ) with a 600 mhz processor, 700 MB of RAM and a small hard drive. I'm wondering if he is "hardware challenged" and perhaps that is leading to these problems ?
Tim
|
Brush issue
|
[quote:2e8sfbpb]So I declared the brush in the main( ) routine as a public object, and then refer to it with every dialog.
[/quote:2e8sfbpb]
This should work correctly as expected.
One possibility is that you might have forgotten to delete the line "RELEASE BRUSH oBrush" in one or two of the modules. This is possible because earlier you had defined and released the brush in each module and now changed it to PUBLIC variable.
You may please search in all prg modules for "RELEASE BRUSH" and ":End()" statements and make sure no such code is still left out there.
Premature destruction of the brush might be happening only in cases where such module(s) is/are used by the users.
|
Brush issue
|
It was all very confusing, but in the end, only two clients had problems, and they were with older machines. One was using XP Home. He replaced his computer with a new box and has no further problems.
I made enough changes, and called the brush LOCAL to each routine, and that solved the last of the problems with the other user. He was also on an XP machine that had numerous problems.
Thanks ...
Tim
|
Brush issue
|
Tim
I am doing my best to try to stop using Static variables in all my routines .. even though many of my routines are single .prg with multiple Static Functions that would lend themselves to Static variables.
I have found using MDI\MDIchildren that if you open the same routine twice the Static variables blend together ( almost like public ) and in the second instance where you update Gets with cGet := "this value" oGet:ReFresh() .. that same field in the first instance gets updated.
I have decided that I will use all Local variables and pass them by reference @cGet to other functions and routines just to MAKE SURE the memory space does not get co-mingled with any other function or event that may open in my application at the same time.
Rick Lipkin
|
Brush issue
|
Rick - with respect, that sounds crazy, you should be using classes and objects for MDI
Each of our MDI windows is a separate object of a "form" class, which automatically then ensures each form is totally independent of others
|
Brush on Dialog
|
Antonio,
It looks like a great idea, but I'm having a problem with using the brush on the dialog.
First, the sample builds fine.
However, from the ppo file:
oBrush := TBrush():New(,,,"Sky" )
DEFINE DIALOG oDiw RESOURCE "PRO2100" BRUSH oBrush TRANSPARENT
and xHarbour gives me the error Parse error at DIALOG. If I comment from BRUSH on with //, then it builds without a problem.
Any thoughts on where I can look for the problem ? Thanks.
Tim
|
Brush on Dialog
|
Tim,
Please check that you are using the new and modified dialog.ch that comes with FWH 2.7 February.
|
Brush on Dialog
|
Antonio,
The new FWH is installed by itself. I rename the old directory and thus the newest download is always just the set of files you included. There is no other copy of dialog.ch in play.
Actually, it is the TRANSPARENT or transparent that causes the problem. If I comment it out, then it will build and show the bitmap in the background, but the titles are not transparent.
If I add TRANSPARENT back in, it fails the compile.
Tim
|
Brush on Dialog
|
I found another instance of DIALOG.CH in hiding ... its running fine now.
We have very warm and very very dry weather here right now and that doesn't always help the thought process.
Tim
|
Brush on Dialog
|
Tim,
glad to know you solved it
|
Brush on Dialog
|
I have a screen with folders, and the background for the dialog will display the bitmap, but not the folders. Here is the code:
// Create the dialog box for editing
DEFINE BRUSH oBrush RESOURCE "SKY"
DEFINE DIALOG oWdlg1 RESOURCE "PRO1000" BRUSH oBrush transparent OF oWnd FONT oWnd:oFont ;
TITLE cTitle
// Define the folder
REDEFINE FOLDER oFld ID 356 OF oWdlg1 ;
PROMPT "&General", "&Parts", "&Labor", "&Recommendations", "&Totals", "&Job Cost" ;
DIALOGS "PRO1010", "PRO1040", "PRO1045", "PRO1070", "PRO1100", "PRO1120" ;
ON CHANGE ( FoldChk( oFld, oDpa, oDla, oWrk ), oWdlg1:update() )
Any ideas on this one ?
Tim
|
Brush on Dialog
|
Tim,
Try to remove the OF oWnd from here:
DEFINE DIALOG oWdlg1 RESOURCE "PRO1000" BRUSH oBrush transparent FONT oWnd:oFont TITLE cTitle
|
Brush on Dialog
|
OK ... removing the reference does not help ... I tried again this morning because I experimented with that yesterday.
I've looked for other files that might be in the path that could cause an issue. I don't see any, but perhaps you could suggest which ones I might need to evaluate.
The problem is consistent wherever I use folders in the program.
Tim
|
Brush on Dialog
|
Tim,
Could you please test samples\TestFldb.prg and confirm if folders look ok with the background bitmap ? Thanks
|
Brush on Dialog
|
I stated in my very first post in this thread that the sample builds fine.
My problem is that my code is basically identical to the sample, so it should also work fine.
Obviously something is missing here.
Which .prg and which .ch files might exist which would cause a problem. In other words, in which files do you have the class code for the folders ? From what might this feature inherit ?
Tim
|
Brush on btnbmp with color
|
I made
[code=fw:2k36pgr6]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><br /><span style="color: #00C800;">Function</span> test<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oDlg,ofont<br /><span style="color: #00C800;">local</span> oBrowse<br /><span style="color: #00C800;">local</span> aData:= <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><span style="color: #00C800;">local</span> oBrush1,oBrush2<br /><span style="color: #00C800;">local</span> obtn<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush1 <span style="color: #0000ff;">STYLE</span> <span style="color: #0000ff;">HORIZONTAL</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush2 <span style="color: #0000ff;">STYLE</span> <span style="color: #0000ff;">HORIZONTAL</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"TAHOMA"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-12</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">400</span>,<span style="color: #000000;">500</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">FONT</span> oFont TRUEPIXEL ;<br /> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"test"</span> TRANSPARENT <span style="color: #0000ff;">COLOR</span> CLR_BLACK,CLR_WHITE<br /><br /><br /><br /> @ <span style="color: #000000;">10</span>,<span style="color: #000000;">10</span> <span style="color: #0000ff;">BTNBMP</span> obtn <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">96</span>,<span style="color: #000000;">96</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg NOROUND <span style="color: #000000;">2007</span><br /><br /> obtn:<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">{</span> |lInvert| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lInvert, oBrush2:<span style="color: #000000;">hBrush</span>, oBrush1:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /> obtn:<span style="color: #000000;">disable</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /> oFont:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">BRUSH</span> oBrush1,oBrush2<br /><span style="color: #00C800;">RETURN</span> NI<br /> </div>[/code:2k36pgr6]
[img:2k36pgr6]https://i.postimg.cc/MKxfT9Fy/te.png[/img:2k36pgr6]
and it run ok as you can see only it show black lines
How I can make to add a color ? for a sample red ?
I made
DEFINE BRUSH oBrush1 STYLE HORIZONTAL COLOR CLR_RED it run ok on easy dialog
but I need on Tfolderex class and it not run ok
I tried to change the color of border for a sample
:nClrBorder := { ||nRgb(218,214,179) } but not work
|
Brush on btnbmp with color
|
Intente ahora:
[code=fw:3mobqd8s]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// \SAMPLES\SILFLDCR.PRG</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span> <span style="color: #B900B9;">//-> The Best...</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Espera_Alvarez<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg, oFld, oFont, aGrad, oBrush, oBrush1, oBrush2, oBtn<br /> <span style="color: #00C800;">LOCAL</span> aBitmaps := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\f</span>acebook.bmp"</span>, ;<br /> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\w</span>indows.bmp"</span> <span style="color: #000000;">}</span><br /><br /> SkinButtons<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> aGrad := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.30</span>, CLR_WHITE, CLR_HBLUE <span style="color: #000000;">}</span>,<span style="color: #000000;">{</span> <span style="color: #000000;">0.50</span>, CLR_HBLUE, CLR_WHITE <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\s</span>ea.bmp"</span> RESIZE <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush1 <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">213</span>, <span style="color: #000000;">174</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">STYLE</span> <span style="color: #0000ff;">HORIZONTAL</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush2 <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">STYLE</span> <span style="color: #0000ff;">HORIZONTAL</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-14</span> BOLD<br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"- TFolderex - Testing -"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">350</span>, <span style="color: #000000;">350</span> ;<br /> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL RESIZABLE <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #B900B9;">//GRADIENT aGrad</span><br /><br /> oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /> <br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> FOLDEREX oFld <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ADJUST</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Prenotazioni"</span>, <span style="color: #ff0000;">"Pagamenti"</span> ;<br /> <span style="color: #0000ff;">BITMAPS</span> aBitmaps ;<br /> TAB HEIGHT <span style="color: #000000;">26</span> OPTION <span style="color: #000000;">1</span> <span style="color: #0000ff;">ROUND</span> <span style="color: #000000;">5</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">COLOR</span> CLR_HGREEN TOP<br /><br /> oFld:<span style="color: #000000;">aEnable</span> = <span style="color: #000000;">{</span> .T., .T., .F. <span style="color: #000000;">}</span><br /><br /> <span style="color: #B900B9;">// NOROUND / NOBORDER</span><br /> @ <span style="color: #000000;">245</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #000000;">2007</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\i</span>chat.bmp"</span> ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Silvio"</span> +CRLF+ <span style="color: #ff0000;">"Wow"</span> +CRLF+ <span style="color: #ff0000;">"FiveWin"</span> +CRLF+ <span style="color: #ff0000;">"The best"</span> ;<br /> <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">(</span> SILVIO_MUESTRA<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">COLOR</span> CLR_CYAN, CLR_BLACK<br /><br /> oBtn:<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">{</span>| lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lInvert, oBrush2:<span style="color: #000000;">hBrush</span>, oBrush1:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /> oBrush:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrush1:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrush2:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oFont:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> SILVIO_MUESTRA<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Silvio, muestre ahora el que no funciona bien"</span>, ;<br /> <span style="color: #ff0000;">"Silvio, muestre ahora el que no funciona bien"</span> <span style="color: #000000;">)</span><br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// fin / end</span><br /> </div>[/code:3mobqd8s]
Regards, saludos.
|
Brush on btnbmp with color
|
Silvio, part II:
[code=fw:1lq9wll0]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// \SAMPLES\SILFLDCR.PRG = Part II</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span> <span style="color: #B900B9;">//-> The Best...</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Espera_Alvarez<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> nCBorder := 0xC38B2B <span style="color: #B900B9;">//, nClrBorder := CLR_HRED //0xE6E6E6</span><br /> <span style="color: #B900B9;">// Olive Color</span><br /> <span style="color: #00C800;">LOCAL</span> nClrBorder := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.2</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">000</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">000</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">000</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">000</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">0.8</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">109</span>, <span style="color: #000000;">135</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">109</span>, <span style="color: #000000;">135</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">LOCAL</span> oDlg, oFld, oFont, aGrad, oBrush, oBrush1, oBrush2, oBtn<br /> <span style="color: #00C800;">LOCAL</span> aBitmaps := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\f</span>acebook.bmp"</span>, ;<br /> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\w</span>indows.bmp"</span> <span style="color: #000000;">}</span><br /><br /> SkinButtons<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> aGrad := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.30</span>, CLR_WHITE, CLR_HBLUE <span style="color: #000000;">}</span>,<span style="color: #000000;">{</span> <span style="color: #000000;">0.50</span>, CLR_HBLUE, CLR_WHITE <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\s</span>ea.bmp"</span> RESIZE <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush1 <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">213</span>, <span style="color: #000000;">174</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">STYLE</span> <span style="color: #0000ff;">HORIZONTAL</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush2 <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">STYLE</span> <span style="color: #0000ff;">HORIZONTAL</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-14</span> BOLD<br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"- TFolderex - Testing -"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">350</span>, <span style="color: #000000;">350</span> ;<br /> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL RESIZABLE <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #B900B9;">//GRADIENT aGrad</span><br /><br /> oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /> <br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> FOLDEREX oFld <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ADJUST</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Prenotazioni"</span>, <span style="color: #ff0000;">"Pagamenti"</span> ;<br /> <span style="color: #0000ff;">BITMAPS</span> aBitmaps ;<br /> TAB HEIGHT <span style="color: #000000;">26</span> OPTION <span style="color: #000000;">1</span> <span style="color: #0000ff;">ROUND</span> <span style="color: #000000;">5</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">COLOR</span> CLR_HGREEN TOP<br /><br /> oFld:<span style="color: #000000;">aEnable</span> = <span style="color: #000000;">{</span> .T., .T., .F. <span style="color: #000000;">}</span><br /><br /> <span style="color: #B900B9;">// NOROUND / NOBORDER</span><br /> @ <span style="color: #000000;">245</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #000000;">2007</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\i</span>chat.bmp"</span> NOBORDER ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Silvio"</span> +CRLF+ <span style="color: #ff0000;">"Wow"</span> +CRLF+ <span style="color: #ff0000;">"FiveWin"</span> +CRLF+ <span style="color: #ff0000;">"The best"</span> ;<br /> <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">(</span> SILVIO_MUESTRA<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">COLOR</span> CLR_CYAN, CLR_BLACK<br /><br /> oBtn:<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">{</span>| lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lInvert, oBrush2:<span style="color: #000000;">hBrush</span>, oBrush1:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> WITH OBJECT oBtn<br /> :<span style="color: #000000;">nClrBorder</span> := nClrBorder<br /> :<span style="color: #000000;">bColorMap</span> := <span style="color: #000000;">{</span> | o | o:<span style="color: #000000;">lBorder</span> := o:<span style="color: #000000;">lMOver</span>, nCBorder <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">lRound</span> := .F.<br /> END<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /> oBrush:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrush1:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrush2:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oFont:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> SILVIO_MUESTRA<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Silvio, muestre ahora el que no funciona bien"</span>, ;<br /> <span style="color: #ff0000;">"Silvio, muestre ahora el que no funciona bien"</span> <span style="color: #000000;">)</span><br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// fin / end</span><br /> </div>[/code:1lq9wll0]
Regards, saludos.
|
Brush on btnbmp with color
|
[quote="karinha":gvvw4bl6]Silvio, part II:
[code=fw:gvvw4bl6]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">// \SAMPLES\SILFLDCR.PRG = Part II</span><br /><br /><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.ch"</span> <span style="color: #B900B9;">//-> The Best...</span><br /><br /><span style="color: #00C800;">FUNCTION</span> Espera_Alvarez<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> nCBorder := 0xC38B2B <span style="color: #B900B9;">//, nClrBorder := CLR_HRED //0xE6E6E6</span><br /> <span style="color: #B900B9;">// Olive Color</span><br /> <span style="color: #00C800;">LOCAL</span> nClrBorder := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.2</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">000</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">000</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">000</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">000</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">0.8</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">109</span>, <span style="color: #000000;">135</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span>, RGB<span style="color: #000000;">(</span> <span style="color: #000000;">109</span>, <span style="color: #000000;">135</span>, <span style="color: #000000;">100</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /> <span style="color: #00C800;">LOCAL</span> oDlg, oFld, oFont, aGrad, oBrush, oBrush1, oBrush2, oBtn<br /> <span style="color: #00C800;">LOCAL</span> aBitmaps := <span style="color: #000000;">{</span> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\f</span>acebook.bmp"</span>, ;<br /> <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\w</span>indows.bmp"</span> <span style="color: #000000;">}</span><br /><br /> SkinButtons<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> aGrad := <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.30</span>, CLR_WHITE, CLR_HBLUE <span style="color: #000000;">}</span>,<span style="color: #000000;">{</span> <span style="color: #000000;">0.50</span>, CLR_HBLUE, CLR_WHITE <span style="color: #000000;">}</span> <span style="color: #000000;">}</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\s</span>ea.bmp"</span> RESIZE <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush1 <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">250</span>, <span style="color: #000000;">213</span>, <span style="color: #000000;">174</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">STYLE</span> <span style="color: #0000ff;">HORIZONTAL</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush2 <span style="color: #0000ff;">COLOR</span> nRGB<span style="color: #000000;">(</span> <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">192</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">STYLE</span> <span style="color: #0000ff;">HORIZONTAL</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"Ms Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">00</span>, <span style="color: #000000;">-14</span> BOLD<br /> <br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"- TFolderex - Testing -"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">350</span>, <span style="color: #000000;">350</span> ;<br /> <span style="color: #0000ff;">PIXEL</span> TRUEPIXEL RESIZABLE <span style="color: #0000ff;">BRUSH</span> oBrush <span style="color: #B900B9;">//GRADIENT aGrad</span><br /><br /> oDlg:<span style="color: #000000;">lHelpIcon</span> := .F.<br /> <br /> @ <span style="color: #000000;">1</span>, <span style="color: #000000;">0</span> FOLDEREX oFld <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">ADJUST</span> <span style="color: #0000ff;">OF</span> oDlg ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Prenotazioni"</span>, <span style="color: #ff0000;">"Pagamenti"</span> ;<br /> <span style="color: #0000ff;">BITMAPS</span> aBitmaps ;<br /> TAB HEIGHT <span style="color: #000000;">26</span> OPTION <span style="color: #000000;">1</span> <span style="color: #0000ff;">ROUND</span> <span style="color: #000000;">5</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">COLOR</span> CLR_HGREEN TOP<br /><br /> oFld:<span style="color: #000000;">aEnable</span> = <span style="color: #000000;">{</span> .T., .T., .F. <span style="color: #000000;">}</span><br /><br /> <span style="color: #B900B9;">// NOROUND / NOBORDER</span><br /> @ <span style="color: #000000;">245</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">BTNBMP</span> oBtn <span style="color: #0000ff;">CENTER</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">100</span>, <span style="color: #000000;">100</span> <span style="color: #0000ff;">PIXEL</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #000000;">2007</span> <span style="color: #0000ff;">UPDATE</span> ;<br /> FILE <span style="color: #ff0000;">"..<span style="color: #000000;">\b</span>itmaps<span style="color: #000000;">\a</span>lphabmp<span style="color: #000000;">\i</span>chat.bmp"</span> NOBORDER ;<br /> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Silvio"</span> +CRLF+ <span style="color: #ff0000;">"Wow"</span> +CRLF+ <span style="color: #ff0000;">"FiveWin"</span> +CRLF+ <span style="color: #ff0000;">"The best"</span> ;<br /> <span style="color: #0000ff;">ACTION</span><span style="color: #000000;">(</span> SILVIO_MUESTRA<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #0000ff;">FONT</span> oFont <span style="color: #0000ff;">COLOR</span> CLR_CYAN, CLR_BLACK<br /><br /> oBtn:<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">{</span>| lInvert | <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lInvert, oBrush2:<span style="color: #000000;">hBrush</span>, oBrush1:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span><br /><br /> WITH OBJECT oBtn<br /> :<span style="color: #000000;">nClrBorder</span> := nClrBorder<br /> :<span style="color: #000000;">bColorMap</span> := <span style="color: #000000;">{</span> | o | o:<span style="color: #000000;">lBorder</span> := o:<span style="color: #000000;">lMOver</span>, nCBorder <span style="color: #000000;">}</span><br /> :<span style="color: #000000;">lRound</span> := .F.<br /> END<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /> oBrush:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrush1:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> oBrush2:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> oFont:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #00C800;">FUNCTION</span> SILVIO_MUESTRA<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Silvio, muestre ahora el que no funciona bien"</span>, ;<br /> <span style="color: #ff0000;">"Silvio, muestre ahora el que no funciona bien"</span> <span style="color: #000000;">)</span><br /><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">// fin / end</span><br /> </div>[/code:gvvw4bl6]
Regards, saludos.[/quote:gvvw4bl6]
[b:gvvw4bl6]sorry the border not is colorized but allways black[/b:gvvw4bl6] and nClrBorder want a codebock
|
Brush on btnbmp with color
|
I liked this model.
[url:boyld17z]https://imgur.com/KufhpL0[/url:boyld17z]
[img:boyld17z]https://i.imgur.com/KufhpL0.png[/img:boyld17z]
Regards, saludos.
|
Brush on btnbmp with color
|
Hay algo errado.
[url:2w46a1ja]https://forums.fivetechsupport.com/viewtopic.php?f=3&t=37314&hilit=bColorMap&start=30&sid=67223e9a38d3804f1ad19ff92a2151cc[/url:2w46a1ja]
Regards, saludos.
|
Brush on btnbmp with color
|
[quote="karinha":1ynygttf]Hay algo errado.
[url:1ynygttf]https://forums.fivetechsupport.com/viewtopic.php?f=3&t=37314&hilit=bColorMap&start=30&sid=6015c3da5779407e49bc9c5077642f3f[/url:1ynygttf]
Regards, saludos.[/quote:1ynygttf]
I may have [b:1ynygttf]become colorblind[/b:1ynygttf] because I'm old man , but here I see the border color allways black
[img:1ynygttf]https://i.postimg.cc/CKC4YVFZ/k.jpg[/img:1ynygttf]
@ oBrw:nBottom+1, oBrw:nWidth-44.4 BTNBMP aBtnBrow[1] SIZE 20,20 PIXEL OF oDlg NOROUND 2007
aBtnBrow[1]:bClrGrad := { |lInvert| If( lInvert, aBru[ 2 ]:hBrush, aBru[ 1 ]:hBrush ) }
WITH OBJECT aBtnBrow[1]
:nClrBorder := nRgb(218,214,179)// border color
:bColorMap := { || { { nRgb( 245,244,234), nRgb(218,214,179) } } } // image color
END
|
Brush on btnbmp with color
|
[quote="Silvio.Falconi":48zjlftj][quote="karinha":48zjlftj]Hay algo errado.
[url:48zjlftj]https://forums.fivetechsupport.com/viewtopic.php?f=3&t=37314&hilit=bColorMap&start=30&sid=638de723023508154ba6e48e483070fe[/url:48zjlftj]
Regards, saludos.[/quote:48zjlftj]
I may have [b:48zjlftj]become colorblind[/b:48zjlftj] because I'm old man , but here I see the border color allways black
[img:48zjlftj]https://i.postimg.cc/CKC4YVFZ/k.jpg[/img:48zjlftj]
@ oBrw:nBottom+1, oBrw:nWidth-44.4 BTNBMP aBtnBrow[1] SIZE 20,20 PIXEL OF oDlg NOROUND 2007
aBtnBrow[1]:bClrGrad := { |lInvert| If( lInvert, aBru[ 2 ]:hBrush, aBru[ 1 ]:hBrush ) }
WITH OBJECT aBtnBrow[1]
:nClrBorder := nRgb(218,214,179)// border color
:bColorMap := { || { { nRgb( 245,244,234), nRgb(218,214,179) } } } // image color
END[/quote:48zjlftj]
jajajaja, habla con el señor Nages.
hahahaha, talk to Mister Nages.
Regards, saludos.
|
Brush on btnbmp with color
|
[quote="karinha":15xpi8jw][quote="Silvio.Falconi":15xpi8jw][quote="karinha":15xpi8jw]Hay algo errado.
[url:15xpi8jw]https://forums.fivetechsupport.com/viewtopic.php?f=3&t=37314&hilit=bColorMap&start=30&sid=35c3bc29202c293a91e12e63268c636b[/url:15xpi8jw]
Regards, saludos.[/quote:15xpi8jw]
I may have [b:15xpi8jw]become colorblind[/b:15xpi8jw] because I'm old man , but here I see the border color allways black
[img:15xpi8jw]https://i.postimg.cc/CKC4YVFZ/k.jpg[/img:15xpi8jw]
@ oBrw:nBottom+1, oBrw:nWidth-44.4 BTNBMP aBtnBrow[1] SIZE 20,20 PIXEL OF oDlg NOROUND 2007
aBtnBrow[1]:bClrGrad := { |lInvert| If( lInvert, aBru[ 2 ]:hBrush, aBru[ 1 ]:hBrush ) }
WITH OBJECT aBtnBrow[1]
:nClrBorder := nRgb(218,214,179)// border color
:bColorMap := { || { { nRgb( 245,244,234), nRgb(218,214,179) } } } // image color
END[/quote:15xpi8jw]
jajajaja, habla con el señor Nages.
hahahaha, talk to Mister Nages.
Regards, saludos.[/quote:15xpi8jw]
[img:15xpi8jw]https://i.postimg.cc/cCkTDtXt/ok.png[/img:15xpi8jw]
Resolved!!!
[url:15xpi8jw]https://forums.fivetechsupport.com/viewtopic.php?f=3&t=36937&start=0&hilit=xbrowse+border[/url:15xpi8jw]
|
Brush or color for a special cell in xBrowse ?
|
Hello,
I use xBrowse as a Color and Brush- Selector.
In the moment i write in a cell
the Style < Borland, Cross > and so on, or < Green, Blue >...
The yellow field in in 1. Array-Col is the default-selection
It would be nicer, to show the brush.
[img:2185cagp]http://pflegeplus.com/pictures/brushes.jpg[/img:2185cagp]
is it possible, to define a special brush for a cell ?
Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: --> [/img]
|
Brush-adjustment (top/left) needed for TFoldex ?
|
Hello,
using my new debuggingtool, I notice a problem
with TFoldex-brushes.
The top and left seems not to be exact adjusted in relation to the defined tabs.
( tab-bottom / brush-top and folder-left / Brush-left )
I think the problem is not the Brush, because I changed the top / left - startposition.
The painting-problem is still the same.
[img:2ctekic3]http://www.pflegeplus.com/pictures/tfoldex1.jpg[/img:2ctekic3]
Zoomed
[img:2ctekic3]http://www.pflegeplus.com/pictures/tfoldex2.jpg[/img:2ctekic3]
Folder - Image-Background
[code=fw:2ctekic3]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br />...<br />@ <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> FOLDEREX oFld1 <span style="color: #0000ff;">OF</span> oDlgMain1 <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">200</span>, <span style="color: #000000;">150</span> <span style="color: #0000ff;">PIXEL</span> ;<br /><span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"Page &1"</span>, <span style="color: #ff0000;">"Page &2"</span>, <span style="color: #ff0000;">"Page &3"</span>, <span style="color: #ff0000;">"&Exit"</span>;<br /><span style="color: #0000ff;">BITMAPS</span> aBitmaps;<br /><span style="color: #0000ff;">ACTION</span><span style="color: #000000;">(</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> nOption == <span style="color: #000000;">4</span>, oDlgMain1:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ;<br /> <span style="color: #0000ff;">MsgInfo</span><span style="color: #000000;">(</span> <span style="color: #ff0000;">"Action defined to "</span> + StrTran<span style="color: #000000;">(</span> ::<span style="color: #000000;">aPrompts</span><span style="color: #000000;">[</span> nOption <span style="color: #000000;">]</span>, <span style="color: #ff0000;">"&"</span>, <span style="color: #ff0000;">""</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> TAB PaintTab<span style="color: #000000;">(</span> <span style="color: #00C800;">Self</span>, nOption <span style="color: #000000;">)</span>;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">CHANGE</span> <span style="color: #000000;">(</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> nOption == <span style="color: #000000;">4</span>, <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> MsgYesNo<span style="color: #000000;">(</span> <span style="color: #ff0000;">"Do you want exit??"</span> <span style="color: #000000;">)</span>, ;<br /> oDlgMain1:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, <span style="color: #000000;">(</span> ::<span style="color: #000000;">SetOption</span><span style="color: #000000;">(</span> nOldOption <span style="color: #000000;">)</span>, ::<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">PAINT</span> <span style="color: #0000ff;">TEXT</span><span style="color: #000000;">(</span> <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> nOption == ::<span style="color: #000000;">nOption</span> .and. nOption == <span style="color: #000000;">2</span>, CLR_YELLOW, CLR_BLACK <span style="color: #000000;">)</span> <span style="color: #000000;">)</span>;<br />TOP OPTION <span style="color: #000000;">2</span> ALIGN AL_LEFT, AL_LEFT, AL_LEFT, AL_LEFT, AL_LEFT, AL_LEFT, AL_LEFT, AL_RIGHT<br /><br />oFld1:<span style="color: #000000;">lTransparent</span> := .T.<br />oFld1:<span style="color: #000000;">nFolderHeight</span> := <span style="color: #000000;">30</span><br />oFld1:<span style="color: #000000;">nSeparator</span> := <span style="color: #000000;">5</span><br />oFld1:<span style="color: #000000;">nRound</span> := <span style="color: #000000;">10</span><br />oFld1:<span style="color: #000000;">bClrText</span> := <span style="color: #000000;">{</span>| o, n | <span style="color: #000000;">128</span> <span style="color: #000000;">}</span><br />oFld1:<span style="color: #000000;">oFont</span> := oFont<span style="color: #000000;">[</span><span style="color: #000000;">1</span><span style="color: #000000;">]</span><br /><br /><span style="color: #B900B9;">// brush-define</span><br /><span style="color: #B900B9;">// ---------------</span><br />F_BACKGRD<span style="color: #000000;">(</span> oFld1, cImageD <span style="color: #000000;">)</span><br />..<br />..<br /><br /><span style="color: #00C800;">FUNCTION</span> F_BACKGRD<span style="color: #000000;">(</span> oFld, cImage <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">LOCAL</span> n, oDlg, hDC<br /><br /><span style="color: #00C800;">FOR</span> n := <span style="color: #000000;">1</span> <span style="color: #0000ff;">to</span> Len<span style="color: #000000;">(</span> oFld:<span style="color: #000000;">aDialogs</span> <span style="color: #000000;">)</span> <br /> oDlg := oFld:<span style="color: #000000;">aDialogs</span><span style="color: #000000;">[</span> n <span style="color: #000000;">]</span><br /> oDlg:<span style="color: #000000;">bPainted</span> := <span style="color: #000000;">{</span>|hDC| F_FULL<span style="color: #000000;">(</span>hDC,oDlg,oDlg:<span style="color: #000000;">nHeight</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,oDlg:<span style="color: #000000;">nWidth</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>,cImage<span style="color: #000000;">)</span><span style="color: #000000;">}</span><br /><span style="color: #00C800;">NEXT</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #B900B9;">// ---------- Folder FULL Image --------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> F_FULL<span style="color: #000000;">(</span> hDC, oDlg, nHeight, nWidth, cImage <span style="color: #000000;">)</span><br /><span style="color: #00C800;">LOCAL</span> oImage<br /><br /><span style="color: #00C800;">IF</span> FILE<span style="color: #000000;">(</span> cImage <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">IMAGE</span> oImage FILENAME cImage<br /> aRect := GETCLIENTRECT<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">hWnd</span> <span style="color: #000000;">)</span><br /> oBrush := TBrush<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">new</span><span style="color: #000000;">(</span>,,,,PalBmpDraw<span style="color: #000000;">(</span>hDC,<span style="color: #000000;">0</span>,<span style="color: #000000;">0</span>,oImage:<span style="color: #000000;">hBitmap</span>,,nWidth,nHeight,, .T.<span style="color: #000000;">)</span><span style="color: #000000;">)</span> <br /> oDlg:<span style="color: #000000;">SetBrush</span><span style="color: #000000;">(</span> oBrush <span style="color: #000000;">)</span><br /> <span style="color: #0000ff;">RELEASE</span> <span style="color: #0000ff;">BRUSH</span> oBrush<br /><span style="color: #00C800;">ELSE</span><br /> MsgAlert<span style="color: #000000;">(</span> <span style="color: #ff0000;">"File : "</span> + cImage + CRLF + ;<br /> <span style="color: #ff0000;">"does not exist"</span> + CRLF + ; <br /> <span style="color: #ff0000;">"to create Background !"</span>, <span style="color: #ff0000;">"ATTENTION"</span> <span style="color: #000000;">)</span> <br /><span style="color: #00C800;">ENDIF</span><br /><br /><span style="color: #00C800;">RETURN</span><span style="color: #000000;">(</span> <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /> </div>[/code:2ctekic3]
Best Regards
Uwe <!-- s:?: --><img src="{SMILIES_PATH}/icon_question.gif" alt=":?:" title="Question" /><!-- s:?: -->
|
Brush... pero de TEXTO ?
|
Hola amigos Fivewinners....
Alguien sabe como, se le ocurre, tiene una idea de como.....
Poner un texto de brush, no puede ser un bitmap, ya que ese texto deberia cambiar de acuerdo a una funcion externa, y no puedo generar tantos bitmaps como textos voy a necesitar.
Lo intente con lo siguiente en la Clausula ON INIT FONDO(ownd)
//-----------------------------------
Function Fondo(oWnd)
Local Texto:=TraeTexto()
For x=1 TO 80
@x,1 say Texto of oWnd Color CLR_HBLUE
Next
Return Nil
... pero queda sobre mi toolbar y un bitmap que tengo centrado en la window.
Cualquier ayuda sera bienvenida...
Grax.
Desde Chile
Adolfo Lagos
|
Brush... pero de TEXTO ?
|
Intentalo con ExTextOut() desde el pintado del dialogo/Window (el :bPainted) antes de colocar el bitmap con PalBmpDraw()
Calcula las coordenadas para poner la primera linea de texto por debajo de la toolbar.
Suerte
Saludos
|
Brush... pero de TEXTO ?
|
Adolfo
ACTIVATE WINDOW oWnd MAXIMIZED ON PAINT ( _miTxt(hDC) )
function _miTxt( hDC )
Local oFont
DEFINE FONT oFont NAME "ROMAN" SIZE 0,-12 BOLD
oFont:Activate( hDC )
SetBkMode(hDC,1)
SetTextColor(hDC,CLR_BLUE)
DrawText(hDC,"SysCtrl Software",{10, 20, 500, 600}, nOr( 1, 4 ) )
RETURN NIL
Espero te sirva
Saludos...
|
Brush... pero de TEXTO ?
|
Antolin, Syscrtl
Gracias por sus respuestas,
primero... ala funcion mitxt es llamada cada vez que paso por encima de un icono, menu etc.
Segundo, desgraciadamente no veo nada, trate de cambiar parametros como las 4 coordenadas, color, tipo y tamaño de la letra y nada.. asi que no pude hacerlo funcionar.
Sobre el ExtTextOut(), estoy rcien viendo como implementarlo.. les comunco si tuve exito
Desde Chile
Adolfo
|
Brush... pero de TEXTO ?
|
Supongo que sería algo asi:
DEFINE FONTO oFont ...
DEFINE Bmp ....
DEFINE DIALOG oDlg ...
...
oDlg:bPainted := { |hDc| MiPaintBrush(hDc,oFont,Bmp) }
...
ACTIVATE DIALOG oDlg ...
[b:38l5wlz1]FUNCTION MiPaintBrsuh(hDc,oFont,Bmp)[/b:38l5wlz1]
LOCAL nX,nY
LOCAL OldFont := SelectObject(hDC,oFont:hFont)
FOR nX = ... TO ... STEP ... // FOR nHorzDesde to nHorzHasta STEP AnchoTexto + Separcion Horizontal entre Textos
FOR nY = ... TO ... STEP ... // FOR nVertDesde to nVertHasta STEP AltoTexto +Separacion Vertical entre Lineas
ExTextOut(hDc,nX,nY,{nX,nY,nX+AnchoTexto,nY+AltoText},"TEXTO A DESPLEGAR")
NEXT
NEXT
SelectObject(hDC,OldFont)
PalDrawText(hDc,X..,Y..,Bmp:hBitmap, Bmp:hPalette,[AnchoBmp,AltoBmp] )
RETURN NIL
Lo más tedioso es calcular las coordenadas. Paciencia.
Saludos
|
Brush... pero de TEXTO ?
|
Tambien puedes probar con DrawText() o WSay() en lugar de ExTextOut() son muy similares. Con fondo transparente u Opaco, Etc... Consulta las ayudas del FWH para ver el uso de esas functiones.
|
Brush... pero de TEXTO ?
|
Adolfo,
la funcion _MiTxt() solo puedes llarme una vez,
utilizando una variable publica,,
public lMiTxt := .t.
if lMiTxt
_miTxt()
lMiTxt := .f.
endif
|
Brush... pero de TEXTO ?
|
Adolfo, en mi posta anterior, con las prisas, he puesto [b:1bn86cu2]PalDrawText[/b:1bn86cu2](hDc,X..,Y..,Bmp:hBitmap, Bmp:hPalette,[AnchoBmp,AltoBmp] )
en lugar de [b:1bn86cu2]PalBmpDraw[/b:1bn86cu2](hDc,X..,Y..,Bmp:hBitmap, Bmp:hPalette,[AnchoBmp,AltoBmp] )
Mil perdones
|
Brush... pero de TEXTO ?
|
Gracias a Todos
Lo he podido hacer mezclando ambas partes de las soluciones que me han enviado, pero en vez de usar ExtTextOut() he utilizado WSay() ya que me permite cambio de color de letra y fondo, y si la deseo transparente o no.
Gracias
|
BrushTools Version 1b (Update) => Download and Info
|
Hello,The Brushtools are ready for download :You can create combinations of Window and Dialog with :Pictures, Gradients, Single Colors and Brushes.1.With the Direction-Browser you can select Gradient Horizontal or Vertical.2.With the Style-Browser you can change between Gradient or Single-Color.3.Slider for moving the 2. Gradient-color.4.File-selection for Pictures ( all types / freeimage used )5.Preview-Window and Source-writer.6. Some nice Pictures included for Background-tests.The next project will be a BUTTON-Creator for Fivewin. !!!------------------------------------------------------------------<!-- m --><a class="postlink" href="http://www.pflegeplus.com/Fw_Downloads/BRTools.zip">http://www.pflegeplus.com/Fw_Downloads/BRTools.zip</a><!-- m -->( For Update 1b, see end of toppic !!!! )The Main-Window--------------------[img:2u86su3s]http://www.pflegeplus.com/pictures/BRTools1.jpg[/img:2u86su3s]The Preview--------------[img:2u86su3s]http://www.pflegeplus.com/pictures/BRTools2.jpg[/img:2u86su3s]The Source-------------[img:2u86su3s]http://www.pflegeplus.com/pictures/BRTools3.jpg[/img:2u86su3s]Best RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
BrushTools Version 1b (Update) => Download and Info
|
Hello,Here is the first Update 1bNow it is possible, to use your own brushes as well[img:1b8ojnqf]http://www.pflegeplus.com/pictures/Brtools4.jpg[/img:1b8ojnqf]You can choose Image or Brush as a Background.some nice images / brushes are included.[img:1b8ojnqf]http://www.pflegeplus.com/pictures/Brtools5.jpg[/img:1b8ojnqf]Download :<!-- m --><a class="postlink" href="http://www.pflegeplus.com/fw_downloads/brushtools2.zip">http://www.pflegeplus.com/fw_downloads/brushtools2.zip</a><!-- m -->RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
BrushTools Version 1b (Update) => Download and Info
|
Hello,there was a little bug in : 2. Dialog-color-selectionIf somebody downloaded version 1.bit is fixed now.RegardsUwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Brushed Group Object
|
Dear All,
How can I make group similar to this:
[img:2w3oqsuo]http://i208.photobucket.com/albums/bb82/fraxzi/FWxHarbour/group.png[/img:2w3oqsuo]
Inside of group border has brush or color.
Any Idea?
Kind regards,
Frances
|
Brushed Group Object
|
Frances,
[img:2cibb8pz]http://www.pflegeplus.com/pictures/group1.jpg[/img:2cibb8pz]
[code=fw:2cibb8pz]<div class="fw" id="{CB}" style="font-family: monospace;"><br />...<br />...<br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">from</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">620</span>, <span style="color: #000000;">900</span> <span style="color: #0000ff;">pixel</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Group-test"</span> TRANSPARENT<br /><br />oGroup:=TGroup<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #000000;">3</span>, <span style="color: #000000;">3</span>, <span style="color: #000000;">15</span>, <span style="color: #000000;">50</span>, <span style="color: #ff0000;">"Label1"</span>, oDlg, <span style="color: #00C800;">NIL</span>, <span style="color: #00C800;">NIL</span>,.F. , .F. , <span style="color: #00C800;">NIL</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span> ;<br /><span style="color: #0000ff;">ON</span> <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">(</span> GROUP_BRUSH<span style="color: #000000;">(</span>oGroup<span style="color: #000000;">)</span>, ;<br /> GradBrush<span style="color: #000000;">(</span> oDlg, <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.50</span>, <span style="color: #000000;">14853684</span>, <span style="color: #000000;">16314573</span> <span style="color: #000000;">}</span>, ;<br /> <span style="color: #000000;">{</span> <span style="color: #000000;">0.50</span>, <span style="color: #000000;">16314573</span>, <span style="color: #000000;">14853684</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span>, .T. <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /><br /><span style="color: #B900B9;">//----------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">STATIC</span> <span style="color: #00C800;">FUNCTION</span> GROUP_BRUSH<span style="color: #000000;">(</span>oGroup<span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> oBrush<br /><br /><span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">BRUSH</span> oBrush FILE cGrp_Brush<br /><br />SET <span style="color: #0000ff;">BRUSH</span> <span style="color: #0000ff;">OF</span> oGroup <span style="color: #0000ff;">TO</span> oBrush<br />oBrush:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">RETURN</span> .T.<br /><br /><span style="color: #B900B9;">// -------------------------------</span><br /><br /><span style="color: #00C800;">FUNCTION</span> GradBrush<span style="color: #000000;">(</span> oDlg, aColors, lPos <span style="color: #000000;">)</span><br /><span style="color: #00C800;">local</span> hDC, hBmp, hBmpOld, oBrush<br /><br /><span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> <span style="color: #000000;">)</span><br /> hDC = CreateCompatibleDC<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> hBmp = CreateCompatibleBitMap<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">hDC</span>, oDlg:<span style="color: #000000;">nWidth</span>, oDlg:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">)</span><br /> hBmpOld = SelectObject<span style="color: #000000;">(</span> hDC, hBmp <span style="color: #000000;">)</span><br /> GradientFill<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span>, oDlg:<span style="color: #000000;">nHeight</span>, oDlg:<span style="color: #000000;">nWidth</span>, aColors, lPos <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> oDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> <span style="color: #000000;">)</span><br /> oDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBitmap</span> = hBmp<br /> oDlg:<span style="color: #000000;">oBrush</span>:<span style="color: #000000;">hBrush</span> = CreatePatternBrush<span style="color: #000000;">(</span> hBmp <span style="color: #000000;">)</span> <br /> SelectObject<span style="color: #000000;">(</span> hDC, hBmpOld <span style="color: #000000;">)</span><br /> oDlg:<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><span style="color: #00C800;">endif</span> <br /><br /><span style="color: #00C800;">RETURN</span> <span style="color: #00C800;">NIL</span><br /> </div>[/code:2cibb8pz]
I tested a Image with Top and Left = 0 :
oGroup:=TGroup():New( [color=#FF0000:2cibb8pz]0, 0[/color:2cibb8pz], 15, 50, "Label1", oDlg, NIL, NIL,.F. , .F. , NIL )
[img:2cibb8pz]http://www.pflegeplus.com/pictures/group2.jpg[/img:2cibb8pz]
But there is a Problem with the Image-adjustment ( top and left )
oGroup:=TGroup():New( [color=#FF0000:2cibb8pz]5, 5[/color:2cibb8pz], 15, 50, "Label1", oDlg, NIL, NIL,.F. , .F. , NIL )
[color=#0000FF:2cibb8pz]STATIC FUNCTION GROUP_TEST(oGroup)
local oBrush, oTmp
DEFINE IMAGE oTmp FILENAME c_path + "\Bitmaps\Fantasy2.jpg"
oBrush := TBrush():new( ,,,, ResizeBmp( oTmp:hBitmap, oGroup:nWidth, oGroup:nHeight, .T. ) )
SET BRUSH OF oGroup TO oBrush
oTmp:End()
RELEASE BRUSH oBrush
RETURN .T.[/color:2cibb8pz]
[img:2cibb8pz]http://www.pflegeplus.com/pictures/group3.jpg[/img:2cibb8pz]
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Brushed Group Object
|
Hola,
could be enough for you, some think like this
[url:35focq8i]http://imageshack.us/photo/my-images/231/rgroup.gif/[/url:35focq8i]
regards
Marcelo
|
Brushed Group Object
|
Hello,
here is the source code and header file
[code=fw:2v73ypz9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/*<br /> Copyright 1999 Jos‚ Lal¡n y Ferreiro <dezac@corevia.com><br /><br /> -[History]-----------------------------------------------------------<br /> Date Author Changes<br /> ---------------------------------------------------------------------<br /> Oct 26, 1999 Jos‚ Lal¡n + Initial release<br /> Oct 27, 1999 Jos‚ Lal¡n ! Minor changes<br /> Apr 17, 2000 Jos‚ Lal¡n + Added New() method<br /> Apr 17, 2000 Jos‚ Lal¡n + Added ::aCtrls var<br /> Feb 03, 2000 Jos‚ Lal¡n ! Changed Paint() method to draw<br /> the caption using ::oDlg:oFont or<br /> ::oFont as requested by Andi Jahja<br /> Feb 04, 2000 Jos‚ Lal¡n ! Improved caption drawing<br />*/</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"FiveWin.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"Constant.ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"rgroup.ch"</span><br /><br /><span style="color: #00D7D7;">#define</span> TRANSPARENT <span style="color: #000000;">1</span><br /><span style="color: #00D7D7;">#define</span> OPAQUE <span style="color: #000000;">2</span><br /><br />#ifdef __XPP__<br /> <span style="color: #00D7D7;">#define</span> <span style="color: #00C800;">Super</span> ::<span style="color: #000000;">TGroup</span><br /> <span style="color: #00D7D7;">#define</span> <span style="color: #00C800;">New</span> _New<br />#endif<br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">function</span> main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">LOCAL</span> oDlg<br /> <span style="color: #00C800;">LOCAL</span> oFnt<br /> <span style="color: #00C800;">LOCAL</span> g<br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">FONT</span> oFnt <span style="color: #0000ff;">NAME</span> <span style="color: #ff0000;">"MS Sans Serif"</span> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">-12</span><br /><br /> <span style="color: #0000ff;">DEFINE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">FROM</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">0</span> <span style="color: #0000ff;">TO</span> <span style="color: #000000;">25</span>, <span style="color: #000000;">60</span> <span style="color: #0000ff;">TITLE</span> <span style="color: #ff0000;">"Test"</span> <span style="color: #0000ff;">FONT</span> oFnt<br /><br /> TRndGroup<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">1</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">8</span>, <span style="color: #ff0000;">"First"</span>, oDlg, CLR_GREEN, CLR_BLACK <span style="color: #000000;">)</span><br /> TRndGroup<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, <span style="color: #000000;">10</span>, <span style="color: #000000;">4</span>, <span style="color: #000000;">18</span>, <span style="color: #ff0000;">"Second"</span>, oDlg, CLR_WHITE, CLR_BLUE,,,,,,,,,,.T., <span style="color: #000000;">10</span> <span style="color: #000000;">)</span><br /><br />@ <span style="color: #000000;">1</span>, <span style="color: #000000;">20</span> ROUNDGROUP <span style="color: #000000;">4</span>, <span style="color: #000000;">28</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"TEST"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">COLOR</span> CLR_GREEN, CLR_GREEN, CLR_WHITE ROUNDLABEL <br /><br />@ <span style="color: #000000;">6</span>,<span style="color: #000000;">5</span> ROUNDGROUP <span style="color: #000000;">10</span>, <span style="color: #000000;">10</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"TEST"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">color</span> CLR_GREEN, CLR_GREEN, CLR_BLUE GRADIENT CLR_BLUE, CLR_RED<br /><br />@ <span style="color: #000000;">6</span>,<span style="color: #000000;">12</span> ROUNDGROUP g <span style="color: #0000ff;">TO</span> <span style="color: #000000;">10</span>, <span style="color: #000000;">20</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"TEST"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">color</span> CLR_BLUE, CLR_BLUE, CLR_WHITE GRADIENT CLR_BLUE, CLR_RED ROUNDLABEL <span style="color: #000000;">5</span><br /><br />@ <span style="color: #000000;">6</span>,<span style="color: #000000;">22</span> ROUNDGROUP <span style="color: #000000;">10</span>, <span style="color: #000000;">30</span> <span style="color: #0000ff;">PROMPT</span> <span style="color: #ff0000;">"TEST"</span> <span style="color: #0000ff;">OF</span> oDlg <span style="color: #0000ff;">color</span> CLR_GRAY, CLR_GRAY, CLR_BLUE GRADIENT CLR_GRAY, CLR_WHITE<br /><br /> <span style="color: #0000ff;">ACTIVATE</span> <span style="color: #0000ff;">DIALOG</span> oDlg <span style="color: #0000ff;">CENTERED</span><br /><br /> oFnt:<span style="color: #000000;">End</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//-----------------------------------------------------------------</span><br /><span style="color: #00C800;">CLASS</span> TRndGroup <span style="color: #0000ff;">FROM</span> TGroup<br /><br /> <span style="color: #00C800;">DATA</span> nClrTitle<br /> <span style="color: #00C800;">DATA</span> nElliWidth<br /> <span style="color: #00C800;">DATA</span> nElliHeight<br /> <span style="color: #00C800;">DATA</span> nClrGrad1<br /> <span style="color: #00C800;">DATA</span> nClrGrad2<br /> <span style="color: #00C800;">DATA</span> lRoundLabel <br /> <span style="color: #00C800;">DATA</span> nRoundLabel <br /><br /> <span style="color: #00C800;">DATA</span> aCtrls AS ARRAY <span style="color: #0000ff;">INIT</span> <span style="color: #000000;">{</span><span style="color: #000000;">}</span><br /><br /> <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">(</span> nTop, nLeft, nBottom, nRight, cLabel, oWnd, nClrText, ;<br /> nClrPane, lPixel, lDesign, nWidth, nHeight, nClrTitle, ;<br /> aCtrls, oFont, nClrGrad1, nClrGrad2, lRoundLabel, nRoundLabel <span style="color: #000000;">)</span> CONSTRUCTOR<br /><br /> <span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">(</span> nId, cLabel, oWnd, nClrText, nClrPane, nWidth, ;<br /> nHeight, nClrTitle, aCtrls, oFont, nClrGrad1, nClrGrad2, lRoundLabel, nRoundLabel <span style="color: #000000;">)</span> CONSTRUCTOR<br /><br /> <span style="color: #00C800;">METHOD</span> Initiate<span style="color: #000000;">(</span> hDlg <span style="color: #000000;">)</span> <span style="color: #00C800;">INLINE</span> <span style="color: #00C800;">Super</span>:<span style="color: #000000;">Initiate</span><span style="color: #000000;">(</span> hDlg <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">Display</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">INLINE</span> ::<span style="color: #000000;">BeginPaint</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ::<span style="color: #0000ff;">Paint</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, ::<span style="color: #000000;">EndPaint</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Paint</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">METHOD</span> DrawCtrls<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">ENDCLASS</span><br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #00C800;">New</span><span style="color: #000000;">(</span> nTop, nLeft, nBottom, nRight, cLabel, oWnd, ;<br /> nClrText, nClrPane, lPixel, lDesign, nWidth, ;<br /> nHeight, nClrTitle, aCtrls, oFont, nClrGrad1, nClrGrad2, lRoundLabel, nRoundLabel <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TRndGroup<br /><br /> <span style="color: #00C800;">DEFAULT</span> nWidth := <span style="color: #000000;">18</span>, ;<br /> nHeight := <span style="color: #000000;">18</span>, ;<br /> nClrText := RGB<span style="color: #000000;">(</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">)</span>, ;<br /> nClrPane := RGB<span style="color: #000000;">(</span> <span style="color: #000000;">160</span>, <span style="color: #000000;">160</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">)</span>, ;<br /> nClrTitle := nClrText, ;<br /> aCtrls := <span style="color: #000000;">{</span><span style="color: #000000;">}</span>,;<br /> lRoundLabel := .F. ,;<br /> nRoundLabel := <span style="color: #000000;">2</span> <br /><br /> <span style="color: #B900B9;">/* NOTE:<br /> We don't pass the nClrText nor nClrPane value to the super class<br /> because it will disable the round corners effect. [jlalin]<br /> */</span><br /> <span style="color: #00C800;">Super</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> nTop, nLeft, nBottom, nRight, cLabel, oWnd, , , ;<br /> lPixel, lDesign,,.T. <span style="color: #000000;">)</span><br /><br /> ::<span style="color: #000000;">nClrText</span> := nClrText<br /> ::<span style="color: #000000;">nClrPane</span> := nClrPane<br /> ::<span style="color: #000000;">nClrTitle</span> := nClrTitle<br /> ::<span style="color: #000000;">nElliWidth</span> := nWidth<br /> ::<span style="color: #000000;">nElliHeight</span> := nHeight<br /> ::<span style="color: #000000;">aCtrls</span> := aCtrls<br /> ::<span style="color: #000000;">oFont</span> := oFont<br /><br /> ::<span style="color: #000000;">nClrGrad1</span> := nClrGrad1<br /> ::<span style="color: #000000;">nClrGrad2</span> := nClrGrad2<br /> ::<span style="color: #000000;">lRoundLabel</span> := lRoundLabel<br /> ::<span style="color: #000000;">nRoundLabel</span> := nRoundLabel<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">(</span> nId, cLabel, oWnd, nClrText, nClrPane, ;<br /> nWidth, nHeight, nClrTitle, aCtrls, oFont, nClrGrad1, nClrGrad2, lRoundLabel, nRoundLabel <span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TRndGroup<br /><br /> <span style="color: #00C800;">DEFAULT</span> nWidth := <span style="color: #000000;">18</span>, ;<br /> nHeight := <span style="color: #000000;">18</span>, ;<br /> nClrText := RGB<span style="color: #000000;">(</span> <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span>, <span style="color: #000000;">128</span> <span style="color: #000000;">)</span>, ;<br /> nClrPane := RGB<span style="color: #000000;">(</span> <span style="color: #000000;">150</span>, <span style="color: #000000;">157</span>, <span style="color: #000000;">132</span> <span style="color: #000000;">)</span>, ;<br /> nClrTitle := nClrText, ;<br /> aCtrls := <span style="color: #000000;">{</span><span style="color: #000000;">}</span> ,;<br /> lRoundLabel := .F.,;<br /> nRoundLabel := <span style="color: #000000;">2</span><br /><br /> <span style="color: #B900B9;">/* NOTE:<br /> We don't pass the nClrText nor nClrPane value to the super class<br /> because it will disable the round corners effect. [jlalin]<br /> */</span><br /><br /> <span style="color: #00C800;">Super</span>:<span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">(</span> nId, cLabel, oWnd,,,,.T. <span style="color: #000000;">)</span><br /><br /> ::<span style="color: #000000;">nClrText</span> := nClrText<br /> ::<span style="color: #000000;">nClrPane</span> := nClrPane<br /> ::<span style="color: #000000;">nClrTitle</span> := nClrTitle<br /> ::<span style="color: #000000;">nElliWidth</span> := nWidth<br /> ::<span style="color: #000000;">nElliHeight</span> := nHeight<br /> ::<span style="color: #000000;">aCtrls</span> := aCtrls<br /> ::<span style="color: #000000;">oFont</span> := oFont<br /><br /> ::<span style="color: #000000;">nClrGrad1</span> := nClrGrad1<br /> ::<span style="color: #000000;">nClrGrad2</span> := nClrGrad2<br /> ::<span style="color: #000000;">lRoundLabel</span> := lRoundLabel<br /> ::<span style="color: #000000;">nRoundLabel</span> := nRoundLabel<br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">Self</span><br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> <span style="color: #0000ff;">Paint</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TRndGroup<br /><br /> <span style="color: #00C800;">LOCAL</span> hDC := ::<span style="color: #000000;">GetDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">LOCAL</span> hBrush, hPen<br /> <span style="color: #00C800;">LOCAL</span> hOldBrush, hOldPen<br /> <span style="color: #00C800;">LOCAL</span> nOldMode, nOldClr, nOldBk<br /> <span style="color: #00C800;">LOCAL</span> hOldFont<br /> <span style="color: #00C800;">LOCAL</span> nHeight<br /><br /> hBrush := CreateSolidBrush<span style="color: #000000;">(</span> ::<span style="color: #000000;">nClrPane</span> <span style="color: #000000;">)</span><br /> hPen := CreatePen<span style="color: #000000;">(</span> <span style="color: #000000;">0</span>, <span style="color: #000000;">1</span>, ::<span style="color: #000000;">nClrText</span> <span style="color: #000000;">)</span><br /><br /> hOldBrush := SelectObject<span style="color: #000000;">(</span> hDC, hBrush <span style="color: #000000;">)</span><br /> hOldPen := SelectObject<span style="color: #000000;">(</span> hDC, hPen<span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">nClrGrad1</span> != <span style="color: #00C800;">NIL</span> .AND. ::<span style="color: #000000;">nClrGrad2</span> != <span style="color: #00C800;">NIL</span><br /> GradientFill<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">4</span> + <span style="color: #000000;">3</span>, <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nHeight</span>, ::<span style="color: #000000;">nWidth</span>, <span style="color: #000000;">{</span> <span style="color: #000000;">{</span> <span style="color: #000000;">0.5</span>, ::<span style="color: #000000;">nClrGrad1</span>, ::<span style="color: #000000;">nClrGrad2</span> <span style="color: #000000;">}</span> <span style="color: #000000;">}</span>, .T. <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> RoundRect<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">4</span> + <span style="color: #000000;">3</span>, <span style="color: #000000;">0</span>, ::<span style="color: #000000;">nHeight</span>, ::<span style="color: #000000;">nWidth</span>, ::<span style="color: #000000;">nElliHeight</span>, ::<span style="color: #000000;">nElliWidth</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">)</span><br /> hOldFont := SelectObject<span style="color: #000000;">(</span> hDC, ;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">oFont</span> == <span style="color: #00C800;">nil</span>, ::<span style="color: #000000;">oWnd</span>:<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span>, ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">hFont</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> nOldMode := SetBkMode<span style="color: #000000;">(</span> hDC, TRANSPARENT <span style="color: #000000;">)</span><br /> nOldClr := SetTextColor<span style="color: #000000;">(</span> hDC, ::<span style="color: #000000;">nClrTitle</span> <span style="color: #000000;">)</span><br /> nOldBk := SetBkColor<span style="color: #000000;">(</span> hDC, ::<span style="color: #000000;">nClrPane</span> <span style="color: #000000;">)</span><br /> nHeight := <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">oFont</span> == <span style="color: #00C800;">nil</span>, <span style="color: #000000;">12</span>, ::<span style="color: #000000;">oFont</span>:<span style="color: #000000;">nHeight</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">IF</span> ::<span style="color: #000000;">lRoundLabel</span><br /> RoundRect<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">2</span> + <span style="color: #000000;">(</span> ::<span style="color: #000000;">nElliWidth</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">3</span> - nHeight + <span style="color: #000000;">7</span>, <span style="color: #000000;">8</span> + <span style="color: #000000;">(</span> ::<span style="color: #000000;">nElliWidth</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> + GetTextWidth<span style="color: #000000;">(</span> hDC, ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">5</span> + <span style="color: #000000;">9</span>, ::<span style="color: #000000;">nRoundLabel</span>, ::<span style="color: #000000;">nRoundLabel</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ELSE</span><br /> Rectangle<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">3</span> - nHeight + <span style="color: #000000;">7</span>, <span style="color: #000000;">2</span> + <span style="color: #000000;">(</span> ::<span style="color: #000000;">nElliWidth</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>, <span style="color: #000000;">5</span> + <span style="color: #000000;">9</span>, <span style="color: #000000;">8</span> + <span style="color: #000000;">(</span> ::<span style="color: #000000;">nElliWidth</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">)</span> + GetTextWidth<span style="color: #000000;">(</span> hDC, ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">ENDIF</span><br /><br /> TextOut<span style="color: #000000;">(</span> hDC, <span style="color: #000000;">3</span> - nHeight + <span style="color: #000000;">8</span>, <span style="color: #000000;">5</span> + <span style="color: #000000;">(</span> ::<span style="color: #000000;">nElliWidth</span> / <span style="color: #000000;">2</span> <span style="color: #000000;">)</span>, ::<span style="color: #000000;">cCaption</span> <span style="color: #000000;">)</span><br /><br /> SelectObject<span style="color: #000000;">(</span> hDC, hOldFont <span style="color: #000000;">)</span><br /> SetTextColor<span style="color: #000000;">(</span> hDC, nOldClr <span style="color: #000000;">)</span><br /> SetBkColor<span style="color: #000000;">(</span> hDC, nOldBk <span style="color: #000000;">)</span><br /> SetBkMode<span style="color: #000000;">(</span> hDC, nOldMode <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /> SelectObject<span style="color: #000000;">(</span> hDC, hOldPen <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> hPen <span style="color: #000000;">)</span><br /><br /> SelectObject<span style="color: #000000;">(</span> hDC, hOldBrush <span style="color: #000000;">)</span><br /> DeleteObject<span style="color: #000000;">(</span> hBrush <span style="color: #000000;">)</span><br /><br /> ::<span style="color: #000000;">DrawCtrls</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> ::<span style="color: #000000;">ReleaseDC</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------------------//</span><br /><br /><span style="color: #00C800;">METHOD</span> DrawCtrls<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TRndGroup<br /><br /> <span style="color: #00C800;">if</span> !Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">aCtrls</span> <span style="color: #000000;">)</span><br /> aEval<span style="color: #000000;">(</span> ::<span style="color: #000000;">aCtrls</span>, <span style="color: #000000;">{</span>|oCtrl| ;<br /> <span style="color: #00C800;">if</span><span style="color: #000000;">(</span> oCtrl != <span style="color: #00C800;">NIL</span>, ;<br /> <span style="color: #000000;">(</span> oCtrl:<span style="color: #000000;">SetColor</span><span style="color: #000000;">(</span> ::<span style="color: #000000;">nClrTitle</span>, ::<span style="color: #000000;">nClrPane</span> <span style="color: #000000;">)</span>, ;<br /> oCtrl:<span style="color: #0000ff;">Refresh</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #000000;">)</span>, ;<br /> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><span style="color: #B900B9;">//--------------------------------------------------------------------------//</span></div>[/code:2v73ypz9]
Header file
[code=fw:2v73ypz9]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><span style="color: #B900B9;">/*<br /> Copyright 1999 Jos‚ Lal¡n y Ferreiro <dezac@corevia.com><br /><br /> -[History]-----------------------------------------------------------<br /> Date Author Changes<br /> ---------------------------------------------------------------------<br /> Oct 27, 1999 Jos‚ Lal¡n + Initial release<br /> Apr 17, 2000 Jos‚ Lal¡n + Added @ ... syntax<br />*/</span><br /><br />#ifndef _ROUNDGROUP_CH<br /><span style="color: #00D7D7;">#define</span> _ROUNDGROUP_CH<br /><br /><span style="color: #B900B9;">/*----------------------------------------------------------------------------//<br />!short: ROUNDGROUP */</span><br /><br />#xcommand @ <nTop>, <nLeft> ROUNDGROUP <span style="color: #000000;">[</span><oGroup> <span style="color: #0000ff;">TO</span><span style="color: #000000;">]</span> <nBottom>, <nRight > ;<br /> <span style="color: #000000;">[</span> <label:<span style="color: #000000;">LABEL</span>,PROMPT> <cLabel> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">OF</span> <oWnd> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">COLOR</span> <nClrFore>, <nClrBack>, <nClrTitle> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lPixel: <span style="color: #000000;">PIXEL</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <lDesign: <span style="color: #000000;">DESIGN</span>> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ROUND</span> WIDTH <nElliWidth> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ROUND</span> HEIGHT <nElliHeight> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> CONTROLS <aCtrls> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">FONT</span> <oFont> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> GRADIENT <nClrGrad1>,<nClrGrad2> <span style="color: #000000;">]</span>;<br /> <span style="color: #000000;">[</span> <lRoundLabel: <span style="color: #000000;">ROUNDLABEL</span>> <span style="color: #000000;">[</span><nRoundLabel><span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ;<br /> => ;<br /> <span style="color: #000000;">[</span> <oGroup> := <span style="color: #000000;">]</span> TRndGroup<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #00C800;">New</span><span style="color: #000000;">(</span> <nTop>, <nLeft>, <nBottom>, <nRight>,;<br /> <cLabel>, <oWnd>, <nClrFore>, <nClrBack>, <.lPixel.>,;<br /> <span style="color: #000000;">[</span><.lDesign.><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><nElliWidth><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><nElliHeight><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><nClrTitle><span style="color: #000000;">]</span>, ;<br /> <span style="color: #000000;">[</span><aCtrls><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><oFont><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><nClrGrad1><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><nClrGrad2><span style="color: #000000;">]</span>, <.lRoundLabel.>,<span style="color: #000000;">[</span><nRoundLabel><span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /><br />#xcommand <span style="color: #0000ff;">REDEFINE</span> ROUNDGROUP <span style="color: #000000;">[</span> <oGroup> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <label:<span style="color: #000000;">LABEL</span>,PROMPT> <cLabel> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ID</span> <nId> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <of: <span style="color: #0000ff;">OF</span>, <span style="color: #0000ff;">WINDOW</span>, DIALOG> <oWnd> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">COLOR</span> <nClrFore>, <nClrBack> <span style="color: #000000;">[</span>, <nClrTitle> <span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ROUND</span> WIDTH <nElliWidth> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">ROUND</span> HEIGHT <nElliHeight> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> CONTROLS <aCtrls> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> <span style="color: #0000ff;">FONT</span> <oFont> <span style="color: #000000;">]</span> ;<br /> <span style="color: #000000;">[</span> GRADIENT <nClrGrad1>,<nClrGrad2> <span style="color: #000000;">]</span>; <br /> <span style="color: #000000;">[</span> <lRoundLabel: <span style="color: #000000;">ROUNDLABEL</span>> <span style="color: #000000;">[</span><nRoundLabel><span style="color: #000000;">]</span> <span style="color: #000000;">]</span> ;<br /> => ;<br /> <span style="color: #000000;">[</span> <oGroup> := <span style="color: #000000;">]</span> TRndGroup<span style="color: #000000;">(</span><span style="color: #000000;">)</span>:<span style="color: #0000ff;">ReDefine</span><span style="color: #000000;">(</span> <nId>, <cLabel>, <oWnd>,;<br /> <nClrFore>, <nClrBack>, <span style="color: #000000;">[</span><nElliWidth><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><nElliHeight><span style="color: #000000;">]</span>, ;<br /> <span style="color: #000000;">[</span><nClrTitle><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><aCtrls><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><oFont><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><nClrGrad1><span style="color: #000000;">]</span>, <span style="color: #000000;">[</span><nClrGrad2><span style="color: #000000;">]</span>, <.lRoundLabel.>,<span style="color: #000000;">[</span><nRoundLabel><span style="color: #000000;">]</span> <span style="color: #000000;">)</span><br /><br />#endif <span style="color: #B900B9;">//_ROUNDGROUP_CH</span><br /><span style="color: #B900B9;">//--------------------------------------------------------------------------//</span><br /><br /> </div>[/code:2v73ypz9]
|
Brushed Group Object
|
Dear Mr. Uwe and Mr. Marcelo,
Thank you so much for the great help.
Kind regards,
Frances
|
Brushed Group Object
|
[b:3ijv2pp6]I added Gradient-options to the Class :[/b:3ijv2pp6]
TRndGroup():New( ;
30, ; // 1 nTop
30, ; // 2 nLeft
150, ; // 3 nBottom
200, ; // 4 nRight
" Title ", ; // 5 Text
oGroup, ; // 6 Object
16314573, ; // 7 nText-color
0, ; // 8 nBackground
.T., ; // 9 Pixel
, ; // 10 lDesign
170, ; // 11 nWidth
120, ; // 12 nHeight
, ; // 13 nColor-Title
, ; // 14 aCtrls
oGrpFont, ; // 15 Font
128, ; // 16 Grad 1 14853684
16314573, ; // 17 Grad 2
.T., ; // 18 Round
10, ; // 19 Circle
[color=#FF0000:3ijv2pp6].T., ; // 20 lGradient-direction
0.5 ) // 21 nGradient-position[/color:3ijv2pp6]
...
...
[color=#FF0000:3ijv2pp6].F., ; // 20 lGradient-direction
0.2 ) // 21 nGradient-position[/color:3ijv2pp6]
[img:3ijv2pp6]http://www.pflegeplus.com/pictures/group4.jpg[/img:3ijv2pp6]
IF ::nClrGrad1 != NIL .AND. ::nClrGrad2 != NIL
GradientFill( hDC, 4 + 3, 0, ::nHeight, ::nWidth, ;
{ { [color=#FF0000:3ijv2pp6]::nPos[/color:3ijv2pp6], ::nClrGrad1, ::nClrGrad2 }, { [color=#FF0000:3ijv2pp6]::nPos[/color:3ijv2pp6], ::nClrGrad2, ::nClrGrad1 } }, [color=#FF0000:3ijv2pp6]::lDirect [/color:3ijv2pp6])
ELSE
RoundRect( hDC, 4 + 3, 0, ::nHeight, ::nWidth, ::nElliHeight, ::nElliWidth )
ENDIF
Best Regards
Uwe <!-- s:lol: --><img src="{SMILIES_PATH}/icon_lol.gif" alt=":lol:" title="Laughing" /><!-- s:lol: -->
|
Brw:VGoBottom() does not work in xBrowse [SOLVED]
|
Good morning, Antonio,
To finish solving the problem of xBrowse and SQLRDD, since Nages doesn't answer the messages, I need to be able to move the vertical scroll bar.
However, oBrw:VGoBottom() and SendMsg( VK_DOWN ) do not work. They don't do anything.
Here is an example.
[code=fw:38j81i50]<div class="fw" id="{CB}" style="font-family: monospace;"><span style="color: #00D7D7;">#Include</span> <span style="color: #ff0000;">"FiveWin.Ch"</span><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"xbrowse.ch"</span><br /><br /><span style="color: #00D7D7;">#include</span> <span style="color: #ff0000;">"hbcompat.ch"</span><br /><br /><br /><br /><span style="color: #00C800;">FUNCTION</span> Main<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> use c:\fwh\samples\customer<br /><br /> TESTBROWSE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> dbcloseall<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><br /> quit<br /><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /><br /><br /><br /><br /><br /><span style="color: #00C800;">function</span> TESTBROWSE<span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">local</span> oDlg<br /> <span style="color: #00C800;">local</span> oBrw<br /><br /> <span style="color: #0000ff;">define</span> <span style="color: #0000ff;">dialog</span> oDlg <span style="color: #0000ff;">title</span> <span style="color: #ff0000;">"Test xBrowse "</span> + cvaltochar<span style="color: #000000;">(</span>datetime<span style="color: #000000;">(</span><span style="color: #000000;">)</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">from</span> <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">to</span> <span style="color: #000000;">24</span>,<span style="color: #000000;">79</span><br /><br /><br /> @ <span style="color: #000000;">0</span>,<span style="color: #000000;">0</span> <span style="color: #0000ff;">xbrowse</span> oBrw datasource <span style="color: #0000ff;">alias</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #0000ff;">of</span> oDlg fastedit <span style="color: #0000ff;">autocols</span> autosort ;<br /> <span style="color: #0000ff;">SIZE</span> <span style="color: #000000;">-1</span>, <span style="color: #000000;">-1</span> <span style="color: #0000ff;">PIXEL</span><br /><br /> oBrw:<span style="color: #000000;">nRowHeight</span> := <span style="color: #000000;">25</span><br /><br /><br /> oBrw:<span style="color: #000000;">lAutoappend</span> := .t.<br /> oBrw:<span style="color: #000000;">CreateFromCode</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /><br /><br /> <span style="color: #0000ff;">activate</span> <span style="color: #0000ff;">dialog</span> oDlg <span style="color: #0000ff;">centered</span> ;<br /> <span style="color: #0000ff;">on</span> <span style="color: #0000ff;">init</span> <span style="color: #000000;">(</span> oBrw:<span style="color: #000000;">VGoBottom</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span>, oBrw:<span style="color: #000000;">oVScroll</span>:<span style="color: #000000;">SendMsg</span><span style="color: #000000;">(</span> VK_DOWN <span style="color: #000000;">)</span> <span style="color: #000000;">)</span><br /><br /><span style="color: #00C800;">return</span> <span style="color: #00C800;">nil</span><br /> </div>[/code:38j81i50]
I'd appreciate your help, since I've been requesting for the fix since December and the customers are extremely pissed off.
Thank you very much. Greetings
|
Brw:VGoBottom() does not work in xBrowse [SOLVED]
|
Just define the needed position from inside the used DBF
and not from a defined xBrowse row-position like :
activate dialog oDlg centered ;
on init DBGOBOTTOM() // seek or anything else
// on init ( oBrw:VGoBottom(), oBrw:oVScroll:SendMsg( VK_DOWN ) )
regards
Uwe <!-- s:D --><img src="{SMILIES_PATH}/icon_biggrin.gif" alt=":D" title="Very Happy" /><!-- s:D -->
|
Brw:VGoBottom() does not work in xBrowse [SOLVED]
|
Hi,
Thank you for your reply.
But I need to force such behaviour in order to get xBrowse work under SQLRDD, as this is the failing issue.
|
Brw:VGoBottom() does not work in xBrowse [SOLVED]
|
Thanks to Cristobal´s help, this is the fix:
[code=fw:p8rykiga]<div class="fw" id="{CB}" style="font-family: monospace;"><br /><br /><span style="color: #00C800;">METHOD</span> KeyCount<span style="color: #000000;">(</span><span style="color: #000000;">)</span> <span style="color: #00C800;">CLASS</span> TXBrowse<br /><br /> <span style="color: #00C800;">TRY</span><br /> <span style="color: #00C800;">if</span> Empty<span style="color: #000000;">(</span> ::<span style="color: #000000;">aFilter</span> <span style="color: #000000;">)</span><br /> ::<span style="color: #000000;">nLen</span> := Eval<span style="color: #000000;">(</span> ::<span style="color: #000000;">bKeyCount</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">else</span><br /> ::<span style="color: #000000;">nLen</span> := Len<span style="color: #000000;">(</span> ::<span style="color: #000000;">aFilter</span> <span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> ::<span style="color: #000000;">lClosed</span> := .f.<br /><br /> CATCH<br /> ::<span style="color: #000000;">nLen</span> := <span style="color: #000000;">0</span><br /> ::<span style="color: #000000;">lClosed</span> := .t.<br /> END<br /><br /><br /> <span style="color: #00C800;">if</span> ::<span style="color: #000000;">oVScroll</span> != <span style="color: #00C800;">nil</span><br /> ::<span style="color: #000000;">VSetRange</span><span style="color: #000000;">(</span> <span style="color: #000000;">1</span>, ::<span style="color: #000000;">nLen</span> <span style="color: #000000;">)</span><br /><br /> <span style="color: #00C800;">if</span> !::<span style="color: #000000;">lSqlRDD</span><br /> ::<span style="color: #000000;">VUpdatePos</span><span style="color: #000000;">(</span><span style="color: #000000;">)</span><br /> <span style="color: #00C800;">endif</span><br /> <span style="color: #00C800;">endif</span><br /><br /><span style="color: #00C800;">return</span> ::<span style="color: #000000;">nLen</span><br /><br /><br /> </div>[/code:p8rykiga]
|
Brw:VGoBottom() does not work in xBrowse [SOLVED]
|
There is no need to use this method directly.
<!-- l --><a class="postlink-local" href="http://forums.fivetechsupport.com/viewtopic.php?f=3&t=38745&p=233158#p233158">viewtopic.php?f=3&t=38745&p=233158#p233158</a><!-- l -->
|
BtnBMP
|
Hi,
When you hover the cursor over the BtnBtn button, the backlight turns on. Can this be banned ?
|
BtnBMP
|
Modify bClrGrad property :
[code=fw:njjfzlr4]<div class="fw" id="{CB}" style="font-family: monospace;">oBtn:<span style="color: #000000;">bClrGrad</span> := <span style="color: #000000;">{</span> |lInvert| <span style="color: #00C800;">If</span><span style="color: #000000;">(</span> lInvert, nARGB<span style="color: #000000;">(</span> <span style="color: #000000;">64</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span>, nARGB<span style="color: #000000;">(</span> <span style="color: #000000;">64</span>, <span style="color: #000000;">0</span>, <span style="color: #000000;">192</span>, <span style="color: #000000;">0</span> <span style="color: #000000;">)</span> <span style="color: #000000;">)</span> <span style="color: #000000;">}</span></div>[/code:njjfzlr4]
|
BtnBMP
|
Thanks !
|
BtnBMP Error
|
Hi,
I'm getting the error below at a customers site:
Application
===========
Path and name: S:\winiws5\Allocinv.EXE (32 bits)
Size: 2,813,952 bytes
Time from start: 0 hours 0 mins 11 secs
Error occurred at: 06/12/2007, 09:24:36
Error description: Error BASE/1068 Argument error: array access
Args:
[ 1] = N 1007158280
[ 2] = N 1
Stack Calls
===========
Called from: BTNBMP.PRG => TBTNBMP:LOADBITMAPS(0)
Called from: BTNBMP.PRG => TBTNBMP:NEWBAR(0)
Called from: COMMON.PRG => CONFPOPBAR(3228)
Called from: POPUP.PRG => (b)CUST_LIST(292)
Called from: DIALOG.PRG => TDIALOG:INITIATE(682)
Called from: DIALOG.PRG => TDIALOG:HANDLEEVENT(832)
Called from: => DIALOGBOX(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(262)
Called from: POPUP.PRG => CUST_LIST(292)
Called from: REPRANGE.PRG => RANGEPOP(156)
Called from: REPRANGE.PRG => (b)RANGE_SEL(111)
Called from: BTNBMP.PRG => TBTNBMP:CLICK(0)
Called from: BTNBMP.PRG => TBTNBMP:LBUTTONUP(0)
Called from: WINDOW.PRG => TWINDOW:HANDLEEVENT(0)
Called from: CONTROL.PRG => TBTNBMP:HANDLEEVENT(0)
Called from: WINDOW.PRG => _FWH(0)
Called from: => DIALOGBOX(0)
Called from: DIALOG.PRG => TDIALOG:ACTIVATE(262)
Called from: REPRANGE.PRG => RANGE_SEL(123)
Called from: => GETRANGES(276)
Called from: ALLOCINV.PRG => MAIN(85)
This error occurs when a dialog box is opened for the second time. Also, we think that this error only occurs when the application is run through a remote desktop connection.
I'm currently using the may 2007 build of fivewin with commercial xHarbour.
Could anyone have a look at the error and try and point me in the right directions?
Many Thanks
Pete
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.