Hola Amigos:
Existe alguna clase o utilería para mostrar los diálogos con sombra?
De antemano gracias por su ayuda.
Manuel Mercado
Diálogos Sombreados
-
- Posts: 297
- Joined: Fri Apr 14, 2006 5:52 pm
- Location: Córdoba (España)
Buenos días Manuel, al fín lo encontré, lo tenía con algunos ejemplos de transparencias, pero ahí va el ejemplo de las sombras. Espero que mi granito de arena te sirva para que continues con tus fabulosos proyectos,
Saludos,
Miguel Angel
Saludos,
Miguel Angel
Code: Select all | Expand
#include "fivewin.ch"#define LWA_ALPHA 2#define GWL_EXSTYLE -20#define WS_EX_LAYERED 524288#define CS_DROPSHADOW 131072#define GCL_STYLE -26function main() LOCAL oDlg, nFactor :=0, btnmais, btnmenos, btnloop DEFINE DIALOG oDlg TITLE "Dialogos con sombra" pixel from 0, 0 to 400, 400 ACTIVATE DIALOG oDlg CENTER on init PonSombra(odlg) //on paint CallFactor(@nFactor,odlg)return nilstatic function PonSombra(odlg) local nInt:=0 nInt:=SetClassLong(oDlg:hWnd,GCL_STYLE,nOr(GetClassLong(odlg:hWnd,GCL_STYLE),CS_DROPSHADOW))// msginfo(nInt)returnstatic function callfactor(nFactor,odlg) local i:=0 for nFactor = 1 to 255 step 1 SETTRANSP( oDlg, nFactor ) sysrefresh() if nFactor = 1 odlg:nWidth:=400 odlg:nHeight:=400 WndCenter( odlg:hWnd ) sysrefresh() end if next i for i = 1 to 1000000 step 0.5 next i for nFactor = 255 to 1 step -1 SETTRANSP( oDlg, nFactor ) sysrefresh() end if oDlg:end()returnstatic function SETTRANSP( oDlg, nFactor ) SETWINDOWLONG( oDlg:hWnd, GWL_EXSTYLE, NOR( GETWINDOWLONG( oDlg:hWnd,GWL_EXSTYLE ), WS_EX_LAYERED ) ) SETLAYEREDWINDOWATTRIBUTES( oDlg:hWnd, , nFactor, LWA_ALPHA )RETURN NILstatic function TRANSPAR( oDlg, nFactor, Sinal, oBtn ) if Sinal = "+" if nFactor < 10 nFactor := 260 endif nFactor -= 5 else if nFactor > 250 nFactor := 5 endif nFactor += 5 end if SetWindowText( oDlg:hWnd, "Transparent dialog. Transparencia: " + alltrim(str(nFactor)) ) SETLAYEREDWINDOWATTRIBUTES( oDlg:hWnd, , nFactor, LWA_ALPHA ) sysrefresh()return nilstatic function TRANSLOOP( oDlg, nFactor, Sinal, oBtn ) local X for X = 1 to 255 step 0.5 SetWindowText( oDlg:hWnd, "Transparent dialog. Transparencia: " + alltrim(str(x)) ) SetLayeredWindowAttributes( oDlg:hWnd, , x, LWA_ALPHA ) next for X = 255 to 1 step -0.5 SetWindowText( oDlg:hWnd, "Transparent dialog. Transparencia: " + alltrim(str(x)) ) SetLayeredWindowAttributes( oDlg:hWnd, , x, LWA_ALPHA ) next SetWindowText( oDlg:hWnd, "Transparent dialog. Transparencia: " + alltrim(str(nFactor)) ) SETLAYEREDWINDOWATTRIBUTES( oDlg:hWnd, , nFactor, LWA_ALPHA ) sysrefresh()return NILDLL32 function SetLayeredWindowAttributes( hWnd As LONG, crKey As LONG, ;bAlpha As LONG, dwFlags As LONG ) AS LONG PASCAL ;from "SetLayeredWindowAttributes" lib "user32.DLL"DLL32 function GetClassLong( hWnd As LONG, crKey As LONG) AS LONG PASCAL ;from "GetClassLongA" lib "user32.DLL"DLL32 function SetClassLong( hWnd As LONG, nValue As LONG, nNewValue As LONG) AS LONG PASCAL ;from "SetClassLongA" lib "user32.DLL"/*DLL32 function GetFreeResources(nX AS LONG) AS LONG PASCAL from ;"_MyGetFreeSystemResources32@4" Lib "RSRC32.DLL"*/
Hola Miguel Angel:Mike Serra wrote:Buenos días Manuel, al fín lo encontré, lo tenía con algunos ejemplos de transparencias, pero ahí va el ejemplo de las sombras. Espero que mi granito de arena te sirva para que continues con tus fabulosos proyectos
Justamente lo que necesito, mil gracias y un abrazo.
Manuel Mercado
Super bonito
Me encontre su ejemplo de poner sombras que lindo en compartir
una preguntita se puede hacer mas grande la sombra
Saludos
Aida
una preguntita se puede hacer mas grande la sombra

Saludos
Aida
Que es mejor que programar? creo que nada 
Atropellada pero aqui ando
I love Fivewin
séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ

Atropellada pero aqui ando

I love Fivewin
séʌǝɹ ןɐ ɐʇsǝ opunɯ ǝʇsǝ
-
- Posts: 325
- Joined: Sun Feb 03, 2008 11:04 pm
- Location: Argetnina
-
- Posts: 325
- Joined: Sun Feb 03, 2008 11:04 pm
- Location: Argetnina