Release 960225
[wine.git] / win32 / param32.c
blob523c265ee4d0cf034f4c1eec0df4658da6e4dd56
1 /*
2 * Win32 relay functions
3 * The implementations here perform only parameter conversions, and
4 * call the Win16 counterparts
6 * Copyright 1996 Martin von Loewis
7 */
9 #include <stdio.h>
10 #include "windows.h"
11 #include "winerror.h"
12 #include "struct32.h"
13 #include "stddebug.h"
14 #include "debug.h"
16 void PARAM32_POINT32to16(const POINT32* p32,POINT* p16)
18 p16->x = p32->x;
19 p16->y = p32->y;
22 void PARAM32_SIZE16to32(const SIZE* p16, SIZE32* p32)
25 p32->cx = p16->cx;
26 p32->cy = p16->cy;
29 /****************************************************************
30 * MoveToEx (GDI32.254)
32 BOOL WIN32_MoveToEx(HDC hdc,int x,int y,POINT32* p32)
34 POINT p;
35 if (p32 == NULL)
36 return MoveToEx(hdc,x,y,(POINT *)NULL);
37 else {
38 PARAM32_POINT32to16(p32,&p);
39 return MoveToEx(hdc,x,y,&p);
43 BOOL WIN32_GetTextExtentPointA(HDC hdc, LPCTSTR str, int length, SIZE32* lpsize)
46 SIZE s;
47 BOOL retval;
49 retval = GetTextExtentPoint(hdc, str, length, &s);
50 PARAM32_SIZE16to32(&s, lpsize);
52 return retval;