WINAPI How do change the parameter type?

Ask for help, how to use AHK_H, etc.
arcticir
Posts: 694
Joined: 17 Nov 2013, 11:32

WINAPI How do change the parameter type?

15 Jul 2017, 14:48

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))
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: WINAPI How do change the parameter type?

15 Jul 2017, 17:36

Either you need to redefine the function or use NumGet(NumPut(16.0,getvar(temp),"Float")-4,"UInt")
arcticir
Posts: 694
Joined: 17 Nov 2013, 11:32

Re: WINAPI How do change the parameter type?

15 Jul 2017, 19:02

Thank you.I used it for an hour to find it, and spent an hour trying to fix it ...
HotKeyIt
Posts: 2364
Joined: 29 Sep 2013, 18:35
Contact:

Re: WINAPI How do change the parameter type?

21 Jul 2017, 18:35

I have implemented Cast to convert data types easily: Cast(16,"float","int")

Return to “Ask for Help”

Who is online

Users browsing this forum: No registered users and 24 guests