FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour CenterMsgs()
Posts: 1048
Joined: Mon Oct 24, 2005 09:54 AM
CenterMsgs()
Posted: Sun Dec 22, 2019 02:05 PM

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
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: CenterMsgs()
Posted: Sun Dec 22, 2019 06:12 PM
To center msgRun() in a window/dialog, use this syntax"
Code (fw): Select all Collapse
MsgRun( cCaption, cTitle, bAction, oWndParent )
Regards



G. N. Rao.

Hyderabad, India
Posts: 10733
Joined: Sun Nov 19, 2006 05:22 AM
Re: CenterMsgs()
Posted: Mon Dec 23, 2019 07:29 AM
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 (fw): Select all Collapse
     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 (fw): Select all Collapse
     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

Continue the discussion