New FTDN November/Noviembre 2016 (FWH 16.11)

New FTDN November/Noviembre 2016 (FWH 16.11)

Postby Antonio Linares » Wed Nov 30, 2016 12:07 pm

November 2016
=============

* Fix: Class TCalendar was calling MsgBeep() when a date is
selected. Now it is ok.

* Fix: function CtrlDrawFocus() was not properly working on
a MdiChild window. Now it is ok:

viewtopic.php?p=195650#p195650

* New DATA bToExcel OF TPrinter object.
If specified this codeblock is used by the Preview class
for exporting to Excel

fwh\samples\prn2excel.prg

* New: Borland 7 64 bits makefile example in makes folder:

viewtopic.php?f=3&t=33205&start=0

* Fix: ICONS: Modifications made in 16.10 resulted in not reading
Icons from resources and exe/dll files. Fixed now.

* New: function ARGB2RGB( nArgbClr/nRgbClr ) -> nRgbClr

* Enhancement: SAY now has a new clause VCENTER. When specified, the
text is vertically centered. This clause forces the text to single
line and is not suitable for multiline text. For Says created from
resource, this attribute is to be specified in the resource only.

* TWindow Method SayText( cText, aRect, cAlign, oFont, nClrText, nClrBack, lBorder )
Applies to all derived classes like dialogs and controls
To be used in o:bPainted.
function FW_SayText( hDC or oWnd, cText, aRect, cAlign, oFont, nClrText, nClrBack, lBorder )
Can be used with Printer DC also

Parameters:
1. cText. ANSI/Unicode single or multi-line text
2. aRect : { nTop, nLeft, nBottom, nRight } in pixels
Defaults to ClientRect
All co-ordinates are relative to Client Rect.
Coordinates:
nil --> default to the border
>= 1 --> Pixels from Top or Left as the case may be
>0 & < 1 --> Percentage of width or height
< 0 : Pixels from right or bottom
3. cAlign : Default Vertical and Horizontal Center
Meaningful Combination of L,R,T,B to indicate Left, Right, etc.
4. oFont: Default window font.
- Can include vertical fonts also
- Array of Fonts: If an array of fonts (not vertical fonts)
is specified and if cText is an array or mult-line text
delimited by CRLF, each line is displayed with each font
in the array
5. nClrText: Defaults to Window's nClrText
- Can be an array of colors in which case each line of
multi-line text is painted with different colors.
- Can also be a single Alpha Color of pointer to GDI+ brush.
In such cases GDI+ is used to render the text with the brush.
6. nClrBack: By default, the painting is transparent.
- RGB color. Used as back color for text
- ARGB color. Used to fill the aRect
- TBrush object: used to fill the aRect
7. lBorder: Default .F.
If .t., single line border is drawn

* Enhancement: Extended paramters for the function
DrawTextEx( hDC, cText, aRect, nStyle, [hFont], ;
[nTextClr], [@nRight] ) --> nHeight
Additional optional parameters hFont and nTextClr
are intended to simplify the code in the calling
functions.
nRight has meaning only when nStyle is Or'ed with
DT_CALCRECT and indicates the right most pixel
required to draw the text. nHeight and nRight can
be used to determine in advance the size of Rect
required to draw the given text

- New function
DrawTextExArray( hDC, aText, aRect, nStyle,
[aFont], [aTextColor], @nRight ) --> nHeight
This function enables display / print multiple
lines of text with different fonts and colors
with specified alignment within a rectangular
area.

Parameters:
1. hDC : Screen or Print DC
2. aText: Array of lines of text
if aText is not array but only text
containing CRLFs, the text converted
into an array.
3. aRect: Bounding rectangle
4. nStyle: DT_constants to specify alignment
within the rectnagle
5. aFont: Array of oFont/hFont to be used to
display corresponding lines in aText
NIL param or nil in any array element
uses default font
6. aTxtClr: Array of colors to be used to display
corresponding lines in aText
7. @nRight: When nStyle includes DT_RECT, nRight
indicates the right most pixel used to
display all the lines
Return Value: Height in pixels of the displayed
area
Note: If none of aArray, aFont, aTextColor is an
array, then this function works like DrawTextEx()

* New GDI+ functions in gdipfwh.cpp
- GDIP_COLORBRUSH( nARGB or nRGB ) --> pBrush
(pointer to GDI+ brush)
- GDIP_IMAGEBRUSH( pImage ) --> pBrush
Parameter pImage is pointer to GDI+ Image
- GDIP_DELETEBRUSH( pBrush )
- GDIP_DRAWTEXT( hDC, cText, aRect, hFont,
pBrush/nClr, cnAlign )
Note: For use when image or alphacolor needs to
be used as brush/color of the text. Useful only
with thick fonts for titles, etc. In other cases
normal text drawing functions/methods serve the
purpose.
Parameters
1. hDC. Please do not use PrintDC
2. Text. Can be ANSI/Unicode and can be
multi-line
3. aRect. { nTop, nLeft, nBottom. nRight } pixels
4. hFont ( GDI font handle ) eg: oFont:hFont
5. nColor or pBrush
nColor can be ARGB color or RGB color
pBrush: Pointer to GDI+ brush object
This is the color/brush applied to the face of
text.
6. cnAlign: Default alignment is center of the rect.
L,R,T,B and combination can be used OR
combination of DT_constants can be used

- GDIP_FILLRECT( hDC, aRect, nARGBColor OR pGdipBrush )
Useful to fill area with Alpha Color. ( Normal FillRect
requires GDI brush handle which does not support
alpha color)

* XBROWSE:
- Enhancement Vertical Merge:
New DATA bMergeValue of TXBrwColumn: By default, rows with
same value of the column are grouped for merging. In some
cases different criterion may be necessary for grouping.
In such cases bMergeValue may be specified.

- Fix: oCol:cDataType 'F': When the value of a column resolves
to a file name of image, specifying oCol:cDataType as 'F'
should display the image in the column. This stopped working
in the last versions and fixed now.

- TXBrwColumn DATA aImgRect ( array/char/codeblock )
By default, the image from column data (image buffer,
weblink or image file) or from bStrImage is painted
to fill the entire cell area. If the image is larger
than the cell area, it is resized to fit the cell area.
Now the DATA aImgRect allows the programmer to specify
precise position of the image, resize mode / shape.
The shape can be rectangle (default) or Circle or
Ellipse. The data can also be a codeblock returning an
array / char value.
aImgRect as Array:
{ nTop, nLeft, nBottom, nRight, [nResizeMode/cShape] )
The coordinates are relative to the cell.
NIL defaults to boundaries of the cell
Positive number >= 1 is added to top or left as the
case may be.
Negative Values are deducted from nBottom/nRight as
the case may be.
Positive fractions from 0 to < 1 are considered as
percentage of width and height.
nResizeMode:
NIL or ommitted: Defaults to 3
0 : No Resize
1 : Stretch ignoring aspect ratio
2 : Resize to cover entire area retaining aspect ratio
3 : Resize to fit inside the are retaining aspect ratio
cShape:
Default Rectangle
E[llipse] : Ellipse
C[ircle] : Circle
Note: This is the same convention for aBmpRect for
BtnBmp and in any other context

Example Usage: fwh\samples\xbrimag2.prg, xbrimag3.prg

- New DATAs TXBrwColumn: aClrText and aDataFont
When specified, different lines of a CRLF separated
multi-line text of cell are displayed with corresponding
colors and fonts in arrays :aClrText and :aDataFont.

See fwh\samples\xbfntclr.prg

- New DATAs TXBrwColumn : nBmpWidth and nClrBmpBack
Improvements to bitmap and text alignment in a column.
Please see
viewtopic.php?f=3&p=195912#p195912
for detailed explanation.

* FWMARIADB

- Method BackUp() now returns empty string in case of
failure while returning backup file name in case of
success.

- Method Restore() returns .T. incase of success.
Some messages used during development were not removed in
the released version. Now removed.

- Enhancement: BackUp() and Restore() now handle tables
having calculated columns and geometry columns also.

- Fix: Specifying a non-existant table in the array of
tables to backup is resulting in run-time error either
during backup or restore. Fixed.

- oCn:QueryResult( cSql ) was returning empty array when
cSql does not return any rows. Now it returns NIL.

- oCn:RowSet( cSql, ... ): Only SELECT and SHOW sqls or
tablename are valid paramters to be used. Other cases
runtime-error was occuring. Now NIL is returned in such
cases and error is set as Invalid SQL.

- Calling stored procedures and functions:
Additional syntax:
Till FWH 16.10
[uRet := ] oCn:Call( "<function>", [p1], ... [pN] )
[oRs := ] oCn:Call( "<procedure>", [[@]p1],...[[@]pN] )
Additional from 16.11:
[uRet := ] oCn:Call( "<function>", aParams )
[oRs := ] oCn:Call( "<procedure>", aParams )
and ? aParams[ nOutParam ]
[uRet := ] oCn:<functioname>( paramslist or aparams )
[oRs := ] oCn:<procedurename>( paramlist or aparams )

- oCn:Explain( cSql, [aParams], [lShow] ) --> lValidSql
Can be used to check validity of sql without executing
Can also be used to view execution plan for optimization

* RICHEDIT5

- New METHOD SaveToPDF( cName, cFile, lView )
cName := <Optional - Name of report - Not used yet>
cFile := File of PDF file
lView := View PDF file, if .T.

You do not need to have WORD installed

* Fix: function GetFontNames() were returning "@" in front of
some fonts names. Now it is ok.
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New FTDN November/Noviembre 2016 (FWH 16.11)

Postby MGA » Wed Nov 30, 2016 12:11 pm

Sr. Antonio, see:

viewtopic.php?f=6&t=33224
ubiratanmga@gmail.com

FWH24.04
BCC7.3
HARBOUR3.2
xMate
Pelles´C
TDolphin
MGA
 
Posts: 1252
Joined: Mon Feb 25, 2008 2:54 pm
Location: Brasil/PR/Maringá

Re: New FTDN November/Noviembre 2016 (FWH 16.11)

Postby Antonio Linares » Wed Nov 30, 2016 1:30 pm

We have not included it as it has not been tested on all Windows versions yet

For now, you can use the proposed solution offered there

thanks for the reminder
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New FTDN November/Noviembre 2016 (FWH 16.11)

Postby Antonio Linares » Fri Dec 02, 2016 10:17 am

FWH 16.11 build 2 already available:

December 2016 (Revd Build 16.11)
===============================

* Fix: XBrowse: Bug in first release: Bitmaps in columns
were not being centered. Fixed.

* Fix: Bar.prg: Long standing bug. When a bar is created
vertically (LEFT or RIGHT) and buttons contain popupmenu,
the width was not accommodating the menu button. Fixed.

* Improvement: method SayText() with brushed fonts was
not honouring alignment clause when compiled with BCC64
and GCC only. Now working with all compilers thanks to
Mr Manuel for his advice in improving GDIP_DrawText()
function.

* MENUS
Added IsThemeActive() for use with version Windows with Theme Classic active
regards, saludos

Antonio Linares
www.fivetechsoft.com
User avatar
Antonio Linares
Site Admin
 
Posts: 42099
Joined: Thu Oct 06, 2005 5:47 pm
Location: Spain

Re: New FTDN November/Noviembre 2016 (FWH 16.11)

Postby cdmmaui » Fri Dec 02, 2016 8:27 pm

Dear Antonio,

Does the Print Preview allow user to save printer output to XLS as it does for PDF?

Thank you,
*~*~*~*~*~*~*~*~*~*
Darrell Ortiz
CDM Software Solutions, Inc.
https://www.cdmsoft.com
User avatar
cdmmaui
 
Posts: 689
Joined: Fri Oct 28, 2005 9:53 am
Location: Houston ∙ Chicago ∙ Los Angeles ∙ Miami ∙ London ∙ Hong Kong


Return to WhatsNew / Novedades

Who is online

Users browsing this forum: No registered users and 7 guests

cron