Alaska Software Inc. - Windows Color for Xbase++ App
Username: Password:
AuthorTopic: Windows Color for Xbase++ App
Jim LeeWindows Color for Xbase++ App
on Sun, 02 Jun 2019 22:31:53 +0200
Andreas Gehrs-Pahl
Re: Windows Color for Xbase++ App
on Mon, 03 Jun 2019 04:50:39 -0400
Jimmy,

>DLLFUNCTION SetSysColors(n,@s,@v) USING STDCALL FROM USER32.DLL
>SetSysColors(1, {COLOR_SCROLLBAR}, {AutomationTranslateColor(GRA_CLR_PINK,.F.)})

>@User32:SetSysColors(1, {COLOR_SCROLLBAR}, {AutomationTranslateColor(GRA_CLR_PINK,.F.)})

>[quote]An array of COLORREF values that contain the new red, green, blue 
>(RGB) color values for the display elements in the array pointed to by the 
>lpaElements parameter.[/quote]

DLLCall (and DLLFunction, etc.) can't handle Arrays as parameters, only 
numbers and strings. So you need to convert the two arrays into something 
DLLCall can use. OT4Xb does that for you automatically, that's why it works 
with OT4Xb, but not with DLLCall.

I have no idea how you convert those arrays, but as both arrays only contain 
a single numerical value, my first try would be without the Array brackets:

SetSysColors(1, COLOR_SCROLLBAR, AutomationTranslateColor(GRA_CLR_PINK,.F.))

If that doesn't work, maybe Pablo can explain how he converts the Array 
values with OT4Xb.

Hope that helps,

Andreas

Andreas Gehrs-Pahl
Absolute Software, LLC

phone: (989) 723-9927
email: Andreas@AbsoluteSoftwareLLC.com
web:   http://www.AbsoluteSoftwareLLC.com
[F]:   https://www.facebook.com/AbsoluteSoftwareLLC
Jim LeeRe: Windows Color for Xbase++ App
on Tue, 04 Jun 2019 20:53:42 +0200
hi,

> DLLCall (and DLLFunction, etc.) can't handle Arrays as parameters, only
> numbers and strings. So you need to convert the two arrays into something
> DLLCall can use. OT4Xb does that for you automatically, that's why it
> works
> with OT4Xb, but not with DLLCall.

Aha ... now i understand, THX



---
Diese E-Mail wurde von AVG auf Viren geprüft.
http://www.avg.com