CenterMsgs()

Post Reply
User avatar
byte-one
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria
Contact:

CenterMsgs()

Post by byte-one »

If on start of the app CenterMsgs() are using, then freezes the programm after call a msgrun() with title!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: CenterMsgs()

Post by nageswaragunupudi »

To center msgRun() in a window/dialog, use this syntax"

Code: Select all

MsgRun( cCaption, cTitle, bAction, oWndParent )
Regards

G. N. Rao.
Hyderabad, India
User avatar
nageswaragunupudi
Posts: 8017
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Contact:

Re: CenterMsgs()

Post by nageswaragunupudi »

byte-one wrote:If on start of the app CenterMsgs() are using, then freezes the programm after call a msgrun() with title!
Please make the following correction to
fwh\source\function\msgrun.prg:

Please locate the following lines in the function msgrun(...)
lines 25 to 34

Code: Select all

     IF cTitle == NIL
          DEFINE DIALOG oDlg ;
               FROM 0,0 TO 3, Len( cCaption ) + 4 ;
               STYLE nOr( DS_MODALFRAME, WS_POPUP )
     ELSE
          DEFINE DIALOG oDlg ;
               FROM 0,0 TO 4, Max( Len( cCaption ), Len( cTitle ) ) + 4 ;
               TITLE cTitle ;
               STYLE DS_MODALFRAME
     ENDIF
 
Please modify the last lines like this:

Code: Select all

     IF cTitle == NIL
          DEFINE DIALOG oDlg ;
               FROM 0,0 TO 3, Len( cCaption ) + 4 ;
               STYLE nOr( DS_MODALFRAME, WS_POPUP )
     ELSE
          DEFINE DIALOG oDlg ;
               FROM 0,0 TO 4, Max( Len( cCaption ), Len( cTitle ) ) + 4 + 2 ;
               TITLE cTitle

     ENDIF
 
Regards

G. N. Rao.
Hyderabad, India
Post Reply