mirror of
https://github.com/reactos/reactos.git
synced 2024-08-19 09:59:44 +00:00
- Better handling of error cases in DrawTextW.
svn path=/trunk/; revision=9903
This commit is contained in:
parent
625c7953e5
commit
13d400fbd2
|
@ -16,7 +16,7 @@
|
||||||
* along with this program; if not, write to the Free Software
|
* along with this program; if not, write to the Free Software
|
||||||
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
* Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
|
||||||
*/
|
*/
|
||||||
/* $Id: font.c,v 1.9 2003/12/21 16:49:41 navaraf Exp $
|
/* $Id: font.c,v 1.10 2004/06/27 11:24:06 navaraf Exp $
|
||||||
*
|
*
|
||||||
* PROJECT: ReactOS user32.dll
|
* PROJECT: ReactOS user32.dll
|
||||||
* FILE: lib/user32/windows/input.c
|
* FILE: lib/user32/windows/input.c
|
||||||
|
@ -97,8 +97,10 @@ static LONG TEXT_TabbedTextOut( HDC hdc, INT x, INT y, LPCWSTR lpstr,
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
TEXTMETRICA tm;
|
TEXTMETRICA tm;
|
||||||
GetTextMetricsA( hdc, &tm );
|
if (GetTextMetricsA( hdc, &tm ))
|
||||||
defWidth = 8 * tm.tmAveCharWidth;
|
defWidth = 8 * tm.tmAveCharWidth;
|
||||||
|
else
|
||||||
|
defWidth = 0;
|
||||||
if (cTabStops == 1)
|
if (cTabStops == 1)
|
||||||
cTabStops = 0; /* on negative *lpTabPos */
|
cTabStops = 0; /* on negative *lpTabPos */
|
||||||
}
|
}
|
||||||
|
@ -742,7 +744,7 @@ static const WCHAR *TEXT_NextLineW( HDC hdc, const WCHAR *str, int *count,
|
||||||
{
|
{
|
||||||
int i = 0, j = 0;
|
int i = 0, j = 0;
|
||||||
int plen = 0;
|
int plen = 0;
|
||||||
SIZE size;
|
SIZE size = {0, 0};
|
||||||
int maxl = *len;
|
int maxl = *len;
|
||||||
int seg_i, seg_count, seg_j;
|
int seg_i, seg_count, seg_j;
|
||||||
int max_seg_width;
|
int max_seg_width;
|
||||||
|
@ -950,7 +952,7 @@ static void TEXT_DrawUnderscore (HDC hdc, int x, int y, const WCHAR *str, int of
|
||||||
{
|
{
|
||||||
int prefix_x;
|
int prefix_x;
|
||||||
int prefix_end;
|
int prefix_end;
|
||||||
SIZE size;
|
SIZE size = {0, 0};
|
||||||
HPEN hpen;
|
HPEN hpen;
|
||||||
HPEN oldPen;
|
HPEN oldPen;
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue