Daniel Halon Posted October 1, 2020 Report Share Posted October 1, 2020 Olá a todos, preciso de uma ajuda, as dialogs de meus programas tinham os cantos arredondados no win 7, agora no win 10 64 ficam quadrados, não faço ideia o que pode ser, no 7 resolvia com o manifest. Quote Link to comment Share on other sites More sharing options...
CTOAS Posted October 1, 2020 Report Share Posted October 1, 2020 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!!! Quote Link to comment Share on other sites More sharing options...
Daniel Halon Posted October 1, 2020 Author Report Share Posted October 1, 2020 Valeu, vou tentar, Tem como fazer que funcione de forma automatica em todas as dialog, ou devo colocar em cada uma? Quote Link to comment Share on other sites More sharing options...
Daniel Halon Posted October 1, 2020 Author Report Share Posted October 1, 2020 tESTEI MAIS NÃO FUNCIONOU, USO FW8.1, NÃO TEM ESSA FUNÇÃO SETWINDOWRGN Quote Link to comment Share on other sites More sharing options...
kapiaba Posted October 2, 2020 Report Share Posted October 2, 2020 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted October 2, 2020 Report Share Posted October 2, 2020 #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 Quote Link to comment Share on other sites More sharing options...
kapiaba Posted October 2, 2020 Report Share Posted October 2, 2020 Achei a fonte: incompetência... Sempre anoto, pô.... "Gumento....". http://forums.fivetechsupport.com/viewtopic.php?f=6&t=21470 Quote Link to comment Share on other sites More sharing options...
oliveiros Posted October 3, 2020 Report Share Posted October 3, 2020 Veja se este link ajuda. http://forums.fivetechsupport.com/viewtopic.php?f=3&t=38264&p=228533&hilit=dialog+border#p228533 Quote Link to comment Share on other sites More sharing options...
mkyx Posted October 5, 2020 Report Share Posted October 5, 2020 Pessoal, será que tem jeito de colocar cantos arredondados no xBrowse? Quote Link to comment Share on other sites More sharing options...
mkyx Posted October 5, 2020 Report Share Posted October 5, 2020 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)) * Quote Link to comment Share on other sites More sharing options...
mkyx Posted October 5, 2020 Report Share Posted October 5, 2020 On Init RoundRecta( oDlg:hWnd, 20 ) esse comando, você coloca em todas as janelas que você desejar os cantos arredondados. 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.