Prezados,
Tem como expandir a tela de um sistema compilador com harbour 3.4 para "desktop area" usando GTWVG?
Só estou conseguindo com o GT GTWVT
Ex.:
Moderador: Moderadores
/*
Compilar usando hbmk2 exemplo.prg -gtwvg -gui
*/
//#include "wvtwin.ch" // acho que em 3.4 é "wvtwin.ch"
#include "hbgtinfo.ch"
Function Main()
Clear Screen
Wvt_SetGui( .t. )
SetMode( 28, 91 ) // ajuste aqui a melhor resolução
SetColor( "GR+/N" )
DispBox( 0, 0, MaxRow(), MaxCol(), Nil )
ConfTela()
Inkey(0)
Return Nil
Func ConfTela() // ajusta tamanho da tela
Local nWidth := Hb_GtInfo(HB_GTI_DESKTOPWIDTH)
Local nHeight := Hb_GtInfo(HB_GTI_DESKTOPHEIGHT)
If nWidth = 1024 .And. nHeight = 768
Wvt_SetFont( "Lucida Console", 28, 12, 0 )
ElseIf nWidth = 1152 .And. nHeight = 864
Wvt_SetFont( "Lucida Console", 31, 13, 0 )
ElseIf nWidth = 1280 .And. nHeight = 600
Wvt_SetFont( "Lucida Console", 21, 15, 0 )
ElseIf nWidth = 1280 .And. nHeight = 720
Wvt_SetFont( "Lucida Console", 26, 15, 0 )
ElseIf nWidth = 1280 .And. nHeight = 768
Wvt_SetFont( "Lucida Console", 28, 15, 0 )
ElseIf nWidth = 1280 .And. nHeight = 960
Wvt_SetFont( "Lucida Console", 35, 15, 0 )
ElseIf nWidth = 1280 .And. nHeight = 1024
Wvt_SetFont( "Lucida Console", 38, 15, 0 )
ElseIf nWidth = 1400 .And. nHeight = 1050
Wvt_SetFont( "Lucida Console", 39, 16, 0 )
Else // se nenhuma anterior, seta padrao
Wvt_SetFont( "Lucida Console", 28, 12, 0 )
EndIf
Wvt_Maximize()
Return Nil
hb_gtInfo( HB_GTI_MAXIMIZED, .T. )
Sim José, mas a questão é como iniciar o sistema em tela cheia com WVG sem interferência do usuário.JoséQuintas escreveu:Ou um jeito relativamente simples: hb_gtInfo( HB_GTI_MAXIMIZED, .T. ) Com isso o usuário pode clicar no maximizar.
Mas a idéia não é essa. É obter um efeito idêntico ao da GTWVT usando o comando que você colocou acima. Com GTWVT funciona, mas com GTWVG não funciona. A idéia é fazer a tela tomar a área do DeskTop, ficando a barra do Windows disponível (como com GTWVT).JoséQuintas escreveu:Não sei se é boa idéia cobrir o iniciar do Windows.
wapi_ShowWindow( wvgSetAppWindow():hWnd, SW_SHOWMAXIMIZED )
PROCEDURE Main
SetMode(30,100)
SetColor("W/B")
CLS
wvgSetAppWindow():sendMessage( WIN_WM_SYSCOMMAND, WIN_SC_MAXIMIZE, 0 )
@ 12, 30 SAY "OLA"
Inkey(0)
RETURN
#define HB_GTI_ALTENTER 62 /* Toggles Alt+Enter as full screen switch (supported by: GTWVT) */
#define HB_GTI_ISFULLSCREEN 63 /* Is the GT windows using the full physical display? (supported by: GTWIN, GTWVT) */
static HB_BOOL hb_gt_wvt_FitSize( PHB_GTWVT pWVT )
if( pWVT->bMaximized )
{
if( ! SystemParametersInfo( SPI_GETWORKAREA, 0, &wi, 0 ) )
return HB_FALSE;
maxHeight = wi.bottom - wi.top - borderHeight;
maxWidth = wi.right - wi.left - borderWidth;
left = 0;
top = 0;
}
It is possible only if we want to compromise the compatibility with other GTs
and also rewrite the whole engine. So my answer is NO.
Usuários vendo este fórum: Nenhum usuário registrado online e 5 visitantes