Maybe my Metro Style Infobox is of any use for you.
Regards,
Otto
- Code: Select all Expand view RUN
#define DT_WORDBREAK 16
function MetroMsgInfo2( cTitel, cAnzeige1 )
local lVar := .f.
local oDlg, oBTNNaviWeiter
local nWidth := GetSysMetrics( 0 )
local nHeight := GetSysMetrics( 1 )
local nLine := 0
local nRowSpace := 20
local nRowOffset := 20
local hOldFont
local nTop := 0
local nLeft := 0
local nBottom := 0
local nRight := nWidth
*----------------------------------------------------------
nLeft := nWidth/7/2.05
nHeight := (nHeight - 100)/ 3 * 2 - nLine
nLine := 16
DEFINE DIALOG oDlg ;
TITLE "Auswahl" ;
FROM 100, -6 ;
TO nHeight, nWidth + 6 ;
PIXEL ;
STYLE nOr( DS_MODALFRAME, WS_POPUP ) ;
COLOR CLR_WHITE, CLR_GREEN ;
FONT Setup():oFntMedium
nLine := 1
@ nRowOffset * nLine , nLeft ;
SAY cTitel ;
OF oDlg ;
PIXEL ;
FONT Setup():oFntMetroGross ;
COLOR CLR_WHITE, CLR_GREEN
nLine := 9
nTop := nRowOffset * nLine
nBottom := nTop + 420/2.05
nRight := nLeft + nWidth/2
*----------------------------------------------------------
nLine := 9
@ nRowOffset + nRowSpace * nLine, nLeft ;
FLATBTN oBTNNaviWeiter ;
PROMPT "OK" ;
FONT Setup():oFntMedium ;
SIZE 76/2.05, ( 24 ) /2.05 ;
OF oDlg ;
ACTION ( lVar := .t., oDlg:End() ) ;
COLOR CLR_GREEN, RGB( 210, 210, 210 )
nLeft := nLeft * 2.05
ACTIVATE DIALOG oDlg ;
ON PAINT ( SetBkMode( oDlg:hDC, 1 ),;
hOldFont := SelectObject( oDlg:hDC, Setup():oFntMetroCombo:hFont ),;
SetTextColor( oDlg:hDC, CLR_WHITE ),;
DrawTextEx( oDlg:hDC, cAnzeige1, {nTop, nLeft, nBottom, nRight }, DT_WORDBREAK ),;
SelectObject( oDlg:hDC, hOldFont ) )
RETURN NIL
//--------------------------------------------------------------------
Have you a function to justify a text of a say on a dialog
sample
#include "Fivewin.ch"
#include "constant.ch"
#define LIGHTCYAN nRGB( 203, 225, 252 )
Functiopn test()
Local nBottom := 20
Local nRight := 42
Local nWidth := Max( nRight * DLG_CHARPIX_W, 180 )
Local nHeight := nBottom * DLG_CHARPIX_H
DEFINE DIALOG oDlg ;
SIZE nWidth, nHeight PIXEL ;
TITLE 'Donazione' ;
GRADIENT { { 1,CLR_WHITE, LIGHTCYAN } } TRANSPARENT
oDlg:lHelpIcon := .F.
oDlg:nStyle := nOR( DS_MODALFRAME, WS_POPUP, WS_CAPTION, 4 )
cMessage:= 'Per poter utilizzare il pacchetto è ora necessario indicare la Chiave di Attivazione Procedura. La versione gratuita '+;
'del programma non permette la stampa dei listati, sarà possibile usare la procedura in modo dimostrativo '+;
'non nella completezza delle sue funzionalità. Premi Attiva per indicare la chiave di attivazione. ';
@ 50, 50 SAY oSay VAR cMessage OF oDlg FONT oFont PIXEL
Activate dialog oDlg