- Code: Select all Expand view
- #include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
DEFINE DIALOG oDlg;
TITLE REPLICATE( "X", 115 )
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
EMG
#include "Fivewin.ch"
FUNCTION MAIN()
LOCAL oDlg
DEFINE DIALOG oDlg;
TITLE REPLICATE( "X", 115 )
ACTIVATE DIALOG oDlg;
CENTER
RETURN NIL
The 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.
Enrico Maria Giordano wrote:Cristobal,
received and already answered!
EMG
#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
DEFINE DIALOG oDlg TITLE REPLICATE( "X", 415 )
DEFINE DIALOG oDlg //TITLE REPLICATE( "X", 415 )
oDlg:cCaption = REPLICATE( "X", 415 )
#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
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
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
Return to Bugs report & fixes / Informe de errores y arreglos
Users browsing this forum: No registered users and 0 guests