-
Notifications
You must be signed in to change notification settings - Fork 60
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Use StrGet()/StrPut() #2
Comments
As an example: Gdip_DrawString(pGraphics, sString, hFont, hFormat, pBrush, ByRef RectF)
{
Ptr := A_PtrSize ? "UPtr" : "UInt"
if (!A_IsUnicode)
{
nSize := DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, Ptr, &sString, "int", -1, Ptr, 0, "int", 0)
VarSetCapacity(wString, nSize*2)
DllCall("MultiByteToWideChar", "uint", 0, "uint", 0, Ptr, &sString, "int", -1, Ptr, &wString, "int", nSize)
}
return DllCall("gdiplus\GdipDrawString"
, Ptr, pGraphics
, Ptr, A_IsUnicode ? &sString : &wString
, "int", -1
, Ptr, hFont
, Ptr, &RectF
, Ptr, hFormat
, Ptr, pBrush)
} AHK 1.1 and 2 support a It can safely be used unless the string is updated by the called function. With respect to issue #1 the function can be changed to: Gdip_DrawString(pGraphics, sString, hFont, hFormat, pBrush, ByRef RectF)
{
return DllCall("gdiplus\GdipDrawString"
, "Ptr", pGraphics
, "WStr", sString
, "int", -1
, "Ptr", hFont
, "Ptr", &RectF
, "Ptr", hFormat
, "Ptr", pBrush)
} |
pa-0
pushed a commit
to pa-0/ahk-GDIpLibrarycompilationv1and2
that referenced
this issue
Sep 11, 2024
Correction integer divider
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
'just me' writes:
The text was updated successfully, but these errors were encountered: