Jump to content
Fivewin Brasil

Cantos arredondados no IMAGE


mkyx

Recommended Posts

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()
 

 

Link to comment
Share on other sites

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.

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...