Muy buenas foro, estoy siempre intentando hacer un dialgo con una imagen de fondo, cuyas esquinas estΓ‘n redondeadas, entonces quiero que se vea la imagen como si fuera el dialogo.
ΒΏMe podeis decir como hacer esto?
Un Saludo.
Muy buenas foro, estoy siempre intentando hacer un dialgo con una imagen de fondo, cuyas esquinas estΓ‘n redondeadas, entonces quiero que se vea la imagen como si fuera el dialogo.
ΒΏMe podeis decir como hacer esto?
Un Saludo.
=====>
Bayron Landaverry
xBasePHP.com
(215)2226600 Philadelphia,PA, USA
MayaBuilders@gMail.com
Guatemala
FWH25.06--Harbour 3.0.0--BCC7.7--UEstudio 10.10
Windows 10
FiveWin, One line of code and it's done...
#include "FiveWin.ch"
function Main()
local oDlg, oBrush, oFont
local nVar := 100
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE BRUSH oBrush FILENAME "\fwh\bitmaps\olga1.jpg"
DEFINE DIALOG oDlg SIZE 300,400 PIXEL ;
TITLE "Image Dialog" ;
BRUSH oBrush FONT oFont TRANSPARENT
@ 10,10 SAY "This is some Text" SIZE 80,12 PIXEL OF oDlg ;
COLOR CLR_WHITE,CLR_BLACK TRANSPARENT
@ 30,10 GET nVar PICTURE "999,999.99" SIZE 80,12 PIXEL OF oDlg RIGHT
@ 180,100 BUTTON "Close" SIZE 40,14 PIXEL OF oDlg ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED
RELEASE BRUSH oBrush
RELEASE FONT oFont
return nil
#include "FiveWin.ch"
function Main()
local oDlg, oBrush, oFont
local nVar := 100
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE BRUSH oBrush FILENAME "\fwh\bitmaps\olga1.jpg"
DEFINE DIALOG oDlg SIZE 300,400 PIXEL ;
TITLE "Image Dialog" ;
STYLE WS_POPUP ;
BRUSH oBrush FONT oFont TRANSPARENT
@ 10,10 SAY "This is some Text" SIZE 80,12 PIXEL OF oDlg ;
COLOR CLR_WHITE,CLR_BLACK TRANSPARENT
@ 30,10 GET nVar PICTURE "999,999.99" SIZE 80,12 PIXEL OF oDlg RIGHT
@ 180,100 BUTTON "Close" SIZE 40,14 PIXEL OF oDlg ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT RoundCorners( oDlg )
RELEASE BRUSH oBrush
RELEASE FONT oFont
return nil
static function RoundCorners( oDlg )
local aRect, hRgn
aRect := GetClientRect( oDlg:hWnd )
hRgn := CreateRoundRectRgn( aRect, 40, 40 )
SetWindowRgn( oDlg:hWnd, hRgn )
DeleteObject( hRgn )
return nil
N,
Nice example -> Thanks !!! ![]()
#pragma BEGINDUMP
HB_FUNC( SETWINDOWRGN )
{
hb_retnl( SetWindowRgn( ( HWND ) hb_parnl( 1 ), ( HRGN ) hb_parnl( 2 ), TRUE ) );
}
#pragma ENDDUMPHola Daniel:
Gracias por responder pronto a mi solicitud, pero creo que estoy bastante desactualizado, Compila sin problemas pero al lanzar el EXE me lanza un MsgStop de error con el Titulo:
Unrecoverable error 9009.
Ni modos.. no pude probarlo..
Gracias de todas maneras..
![]()
es pssivel, haga clic en la imagen y arrastre la pantalla
Hi nageswaragunupudi, Daniel,
compiling the sample:
ββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FiveWin for Harbour 11.03 - Mar. 2011 Harbour development power ββ
β (c) FiveTech, 1993-2011 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7 ββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Compiling...
Harbour 2.1.0beta1 (Rev. 14559)
Copyright (c) 1999-2010, http://www.harbour-project.org/
Compiling 'prueba.prg' and generating preprocessed output to 'prueba.ppo'...
Lines 3837, Functions/Procedures 2
Generating C source output to 'prueba.c'... Done.
Embarcadero C++ 6.30 for Win32 Copyright (c) 1993-2010 Embarcadero Technologies,
Inc.
prueba.c:
Error E2451 prueba.prg 47: Undefined symbol 'HWND' in function HB_FUN_SETWINDOWR
GN
Error E2121 prueba.prg 47: Function call missing ) in function HB_FUN_SETWINDOWR
GN
*** 2 errors in Compile ***
* Linking errors *
Thanks a lot !!!
Best regards,
Felix
Hello
in your C code, do you have
#include "FiveWin.ch"
function Main()
local oDlg, oBrush, oFont
local nVar := 100
DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
DEFINE BRUSH oBrush FILENAME "Anboto.bmp"
DEFINE DIALOG oDlg SIZE 300,400 PIXEL ;
TITLE "Image Dialog" ;
STYLE WS_POPUP ;
BRUSH oBrush FONT oFont TRANSPARENT
@ 10,10 SAY "This is some Text" SIZE 80,12 PIXEL OF oDlg ;
COLOR CLR_WHITE,CLR_BLACK TRANSPARENT
@ 30,10 GET nVar PICTURE "999,999.99" SIZE 80,12 PIXEL OF oDlg RIGHT
@ 180,100 BUTTON "Close" SIZE 40,14 PIXEL OF oDlg ACTION oDlg:End()
ACTIVATE DIALOG oDlg CENTERED ;
ON INIT RoundCorners( oDlg )
RELEASE BRUSH oBrush
RELEASE FONT oFont
return nil
static function RoundCorners( oDlg )
local aRect, hWnd, hRgn
aRect := GetClientRect( oDlg:hWnd )
hRgn := CreateRoundRectRgn( aRect, 40, 40 )
SetWindowRgn( oDlg:hWnd, hRgn )
DeleteObject( hRgn )
return nil
#pragma BEGINDUMP
HB_FUNC( SETWINDOWRGN )
{
hb_retnl( SetWindowRgn( ( HWND ) hb_parnl( 1 ), ( HRGN ) hb_parnl( 2 ), TRUE ) );
}
#pragma ENDDUMP#pragma BEGINDUMP
#include <Windows.h>
#include <ClipApi.h>
HB_FUNC( SETWINDOWRGN )
{
Β hb_retnl( SetWindowRgn( ( HWND ) hb_parnl( 1 ), ( HRGN ) hb_parnl( 2 ), TRUE ) );
}
#pragma ENDDUMPββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
β FiveWin for Harbour 11.03 - Mar. 2011 Harbour development power ββ
β (c) FiveTech, 1993-2011 for Microsoft Windows 9X/NT/200X/ME/XP/Vista/7 ββ
βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Β βββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββββ
Compiling...
Harbour 2.1.0beta1 (Rev. 14559)
Copyright (c) 1999-2010, http://www.harbour-project.org/
Compiling 'prueba.prg' and generating preprocessed output to 'prueba.ppo'...
Lines 3839, Functions/Procedures 2
Generating C source output to 'prueba.c'... Done.
Embarcadero C++ 6.30 for Win32 Copyright (c) 1993-2010 Embarcadero Technologies,
Inc.
prueba.c:
Warning W8065 prueba.prg 49: Call to function 'hb_parnl' with no prototype in fu
nction HB_FUN_SETWINDOWRGN
Warning W8065 prueba.prg 49: Call to function 'hb_parnl' with no prototype in fu
nction HB_FUN_SETWINDOWRGN
Warning W8065 prueba.prg 49: Call to function 'hb_retnl' with no prototype in fu
nction HB_FUN_SETWINDOWRGN
Turbo Incremental Link 6.10 Copyright (c) 1997-2010 Embarcadero Technologies, In
c.
* Application successfully built *