Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
DEFINE DIALOG oDlg;
TITLE REPLICATE( "X", 115 )
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
DEFINE DIALOG oDlg;
TITLE REPLICATE( "X", 115 )
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
EnricoThe following sample demonstrates the problem. It doesn't show the dialog (tested under Win 8.1). It works correctly with a title up to 114 characters. In dialog.prg there is a check for maximum size of 140 characters. It should be lower to 114.
I answeredEnrico Maria Giordano wrote:Cristobal,
received and already answered!
EMG
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
DEFINE DIALOG oDlg;
// TITLE REPLICATE( "X", 115 )
// oDlg:cCaption = REPLICATE( "X", 115 )
ACTIVATE DIALOG oDlg;
ON INIT oDlg:SetText( REPLICATE( "X", 500 ) );
CENTER
RETURN NIL
Code: Select all
DEFINE DIALOG oDlg TITLE REPLICATE( "X", 415 )
Code: Select all
DEFINE DIALOG oDlg //TITLE REPLICATE( "X", 415 )
oDlg:cCaption = REPLICATE( "X", 415 )
Code: Select all
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
DEFINE DIALOG oDlg //TITLE REPLICATE( "X", 415 )
//oDlg:cCaption = REPLICATE( "X", 415 )
ACTIVATE DIALOG oDlg;
ON INIT oDlg:SetText( REPLICATE( "X", 500 ) );
VALID (Msginfo( Len( oDlg:cCaption ) ), .T. );
CENTER
RETURN NIL
Code: Select all
if ::bInit != nil
lResult = Eval( ::bInit, Self )
if ValType( lResult ) == "L" .and. ! lResult
lFocus = .f.
endif
endif
// Add
if len( ::cCaption ) > 140
::cCaption := Left( ::cCaption , 140 )
::SetText( ::cCaption )
endif
No! Unfortunately this is not the right fix, sorry.Enrico Maria Giordano wrote:Found! It seems that the correct solution is:
WORD wSize = sizeof( DIALOG_RES ) + ( hb_parclen( 6 ) * 2 ) +
1 + 2 + ( hb_parclen( 9 ) * 2 ) + 3 + 1;
Please note the + 1 at the end of the line. With it I can use a title of 10000 characters without problems!
EMG