Jump to content
Fivewin Brasil

Cantos arredondados na dialog no win10 64


Daniel Halon

Recommended Posts

Boa Noite
 

ACTIVATE DIALOG oDlg CENTERED ON INIT ROUNDRECT(oDlg:hWnd,20)
***************************************************************************************************
FUNCTION ROUNDRECT( hWnd, nROUND )
***************************************************************************************************

	DEFAULT nROUND := 0

RETURN SETWINDOWRGN(hWnd,CREATEROUNDRECTRGN(GETCLIENTRECT(hWnd),nROUND,nROUND))

Acho que isso resolve...

Abraços!!!

Link to comment
Share on other sites

#include "FiveWin.ch"
	function Main()
	   local oDlg, oBrush, oFont
   local nVar  := 100
	   DEFINE FONT oFont NAME "TAHOMA" SIZE 0,-14
   DEFINE BRUSH oBrush FILENAME "\fwh1701\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
	#pragma BEGINDUMP
	#include <Windows.h>
	HB_FUNC( SETWINDOWRGN )
{
  hb_retnl( SetWindowRgn( ( HWND ) hb_parnl( 1 ), ( HRGN ) hb_parnl( 2 ), TRUE ) );
}
#pragma ENDDUMP

Link to comment
Share on other sites

Como faço, para conseguir os cantos arredondados numa dialog

 

DEFINE DIALOG ODLG FROM 0,0 TO 15,50 STYLE NOR(WS_POPUPWINDOW) COLORS RGB(112,219,219),RGB(112,219,219) TRANSPARENT

 

.

.

ACTIVATE DIALOG ODLG CENTERED NOMODAL On Init RoundRecta( oDlg:hWnd, 20 ) 

RETURN .T.

***
Function RoundRecta( hWnd, nRound )
Default nRound := 0
Return SetWindowRgn(hWnd,CreateRoundRectRgn(GetClientRect(hWnd),nRound,nRound))
*
 

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...