Antonio, CENTER for msg...

Antonio, CENTER for msg...

Postby byte-one » Tue Jul 05, 2011 3:19 pm

Antonio,
it should also be able, the msg... functions centering to parent-window/dialog with the new function!
Regards,
Günther
---------------------------------
office@byte-one.com
User avatar
byte-one
 
Posts: 1048
Joined: Mon Oct 24, 2005 9:54 am
Location: Austria

Re: Antonio, CENTER for msg...

Postby nageswaragunupudi » Wed Jul 06, 2011 2:07 am

All the msg...() functions call the standard Windows MessageBox() function, which always centers the dialogs with respect to the Desktop.

If we want these messages to be centered inside our application window, we need to have our own functions, using FWH Dialogs.
Regards

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

Re: Antonio, CENTER for msg...

Postby ukoenig » Wed Jul 06, 2011 11:36 am

That is the reason, I creating very often my own functions, not using Window-standards.
The Message-center-position is calculated inside the Function with given .T. ( .F. uses the defined Top/left-position )
You can use my solution, in case You like it.
There is still some work on the Painter to do.
In case You only want to use Brushes or Images, You can delete the not needed Parameters.
I need them complete, because testing all possible Combinations.
Maybe there will be some more, because of Shadow-size and Position.
Call the Function on Init or on Button-action.

A centered Message inside a Dialog :

Image

ACTIVATE DIALOG oDlg1 CENTERED ;
ON INIT SHOW_MSG1( ;
oDlg1, ; // Object
nTStyle, ; // Background
nTTop, ; // Top
nTLeft, ; // Left
nTWidth, ; // Width
nTHeight, ; // Hight
oFont1, ; // Font Headline
oFont2, ; // Font Text
.T., ; // Message centered
nTextT, ; // Text-Top
nTextL, ; // Text-Left
cTitle, ; // Title
cText1, ; // Text 1
cText2, ; // Text 2
cText3, ; // Text 3
cText4, ; // Text 4
cText5, ; // Text 5
nTColorF, ; // 1. Gradient-color
nTColorB, ; // 2. Gradient-color
nTGradPos, ; // Gradient-position
nTColor1, ; // Head-color
nTColor2, ; // Text-color
cTBitmap, ; // Bitmap
nBmpT, ; // Top
nBmpL, ; // Left
nBmpW, ; // Width
nBmpH, ; // Hight
cTBrush, ; // Brush
cTImage ) // Image

RETURN( NIL )


Best Regards
Uwe :lol:
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
User avatar
ukoenig
 
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany


Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 91 guests