Page 1 of 1

WINAPI How do change the parameter type?

Posted: 15 Jul 2017, 14:48
by arcticir
I tried to convert this function, but WINAPI version is always invalid. Seems to be "float" type, Should not be entered like this ...
How to correct it correctly?

Code: Select all

DllCall("gdiplus\GdipCreateFont", "UPtr", hFamily, "float", 16, "int", 0, "int", 0, "UPtr*", hFont)

GdipCreateFont(hFamily, 16.0, 0, 0, getvar(hFont:=0))

Re: WINAPI How do change the parameter type?

Posted: 15 Jul 2017, 17:36
by HotKeyIt
Either you need to redefine the function or use NumGet(NumPut(16.0,getvar(temp),"Float")-4,"UInt")

Re: WINAPI How do change the parameter type?

Posted: 15 Jul 2017, 19:02
by arcticir
Thank you.I used it for an hour to find it, and spent an hour trying to fix it ...

Re: WINAPI How do change the parameter type?

Posted: 21 Jul 2017, 18:35
by HotKeyIt
I have implemented Cast to convert data types easily: Cast(16,"float","int")