Antonio, CENTER for msg...

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

Antonio, CENTER for msg...

Post by byte-one »

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
nageswaragunupudi
Posts: 10721
Joined: Sun Nov 19, 2006 5:22 am
Location: India
Been thanked: 8 times
Contact:

Re: Antonio, CENTER for msg...

Post by nageswaragunupudi »

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
ukoenig
Posts: 4043
Joined: Wed Dec 19, 2007 6:40 pm
Location: Germany
Contact:

Re: Antonio, CENTER for msg...

Post by ukoenig »

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.
Post Reply