CenterMsgs()

CenterMsgs()

Postby byte-one » Sun Dec 22, 2019 2: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
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: CenterMsgs()

Postby nageswaragunupudi » Sun Dec 22, 2019 6:12 pm

To center msgRun() in a window/dialog, use this syntax"
Code: Select all  Expand view
MsgRun( cCaption, cTitle, bAction, oWndParent )
Regards

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

Re: CenterMsgs()

Postby nageswaragunupudi » Mon Dec 23, 2019 7: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: Select all  Expand view
    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  Expand view
    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
User avatar
nageswaragunupudi
 
Posts: 10620
Joined: Sun Nov 19, 2006 5:22 am
Location: India


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 56 guests