mkyx Posted September 28, 2023 Report Share Posted September 28, 2023 Boa noite, FiveWinners Alguém sabe como deixar os cantos arredondados, no comando que exibe imagens, o IMAGE ? Exemplo do camando: GCFILE:=PASTA_FOTO+"\FOTO000000.JPG" @ 10,10 IMAGE oImage1 SIZE 100,100 OF oWnd PIXEL noborder CURSOR OCURSOR oImage1:Progress( .F. ) oImage1:LoadBmp( gcFile ) oImage1:ltransparent:=.T. oImage1:lStretch:=.T. oImage1:ScrollAdjust() oImage1:Refresh() Quote Link to comment Share on other sites More sharing options...
kapiaba Posted September 28, 2023 Report Share Posted September 28, 2023 Veja se ajuda: // C:\FWH..\SAMPLES\SKIN5.PRG #include "FiveWin.ch" MEMVAR mover, nRounder function Main() local oDlg, oBrush, oFont local nVar := 100 /* public mover := .t. public nRounder := 20 // Change this value betwen 0 and 250 to see a results */ mover := .T. nRounder := 20 SkinButtons() DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14 DEFINE BRUSH oBrush FILENAME "\fwh1905\bitmaps\olga1.jpg" DEFINE DIALOG oDlg SIZE 300,400 PIXEL TITLE "Image Dialog" ; STYLE WS_POPUP BRUSH oBrush FONT oFont TRANSPARENT @ 000,000 BITMAP resource "" NOBORDER OF oDlg PIXEL SIZE 80,21 ; ON LEFT CLICK Click(oDlg) @ 010,010 SAY "This is some Text" SIZE 80,12 PIXEL OF oDlg ; COLOR CLR_WHITE,CLR_BLACK TRANSPARENT @ 030,010 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 Click(yvent) LOCAL nGCPos If !mover return nil Endif While GetKeyState(VK_LBUTTON) SysRefresh() nGCPos := GetCursorpos() MoveWindow( yvent:hWnd, nGCPos[1],nGCPos[2], yvent:nWidth,yvent:nHeight,.t. ) Sysrefresh() If !GetKeyState(VK_LBUTTON) Exit Endif Enddo nGCPos := GetCursorpos() return nil static function RoundCorners( oDlg ) local aRect, hRgn aRect := GetClientRect( oDlg:hWnd ) hRgn := CreateRoundRectRgn( aRect, nRounder, nRounder ) SetWindowRgn( oDlg:hWnd, hRgn ) DeleteObject( hRgn ) return nil #pragma BEGINDUMP #include <Windows.h> // #include <ClipApi.h> #include <hbApi.h> HB_FUNC( SETWINDOWRGN ) { hb_retnl( SetWindowRgn( ( HWND ) hb_parnl( 1 ), ( HRGN ) hb_parnl( 2 ), TRUE ) ); } #pragma ENDDUMP \regards, saludos. Quote Link to comment Share on other sites More sharing options...
kapiaba Posted September 28, 2023 Report Share Posted September 28, 2023 Veja também: c:\fwh..\source\function\msglogo.prg Regards, saludos. Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.