GDIPlusX:Backwards compatibility

Topics: General
Developer
Oct 16, 2006 at 1:31 PM
Is anyone interested in having the GDIPlusX library backwards compatible? It currently only works with VFP9, but if there is a demand and if we could get some assistance, I think we may be able to offer it for earlier versions of VFP.

My idea is to create a VFP9 function library and include file that would fill in the gaps of missing functionality between versions. For instance, the single biggest non-compatible line of code in the library is BINTOC(nSomeValue,"4rs")...the "4rs" was a nice addition to VFP9 but does not work in VFP8 and earlier. This could easily be coded to work in earlier versions, I'm sure there are hunders of Int2String() functions floating around.

Below is a sample of what I'm talking about creating. Something like this may even be of use on other projects.

Let me know what you think...

****************************************************
    • This part would be in VFP9FUNCTIONS.H
****************************************************
#IF VERSION(5) < 900
#DEFINE BINTOC BINTOC_VFP9
#ENDIF
****************************************************

CLEAR
?BINTOC(65,"4rs")
?BINTOC(65,4)


#UNDEF BINTOC
****************************************************
    • This part would be in VFP9FUNCTIONS.PRG
****************************************************
FUNCTION BINTOC_VFP9(nValue, eFlags)

IF VARTYPE(eFlags) = "N"
RETURN BINTOC(nValue, eFlags)
ENDIF

DO CASE
CASE UPPER(eFlags)="4RS"
RETURN CHR(BITAND(nVal,0xFF))+;
CHR(BITLSHIFT(BITAND(nVal,0x0000FF00),8))+;
CHR(BITLSHIFT(BITAND(nVal,0x00FF0000),16))+;
CHR(BITLSHIFT(BITAND(nVal,0xFF000000),24))
*!ToDo: more code required...
OTHERWISE
ENDCASE
ENDFUNC
****************************************************
Oct 17, 2006 at 1:57 AM
binarybo,
Backward compatible is welcomed. Please don't hesitate to email me if you think I could help.

Thank you
Developer
Oct 19, 2006 at 1:09 PM
Chanmy8,

We need all the help we can get! <bg>

I'm not sure I have your email address, but send me an email to: gdiplusx@moxiedata.com and we can get you onboard.

Thanks!
Bo Durban
Oct 22, 2006 at 4:10 PM
Hi,
I am not sure my email had been sent. Anyway, you can reach me by pdrm@hotmail.com

Thank you
Developer
Apr 10, 2007 at 10:51 AM
Dear Bo,

Being backward compatible would be great. Not everybody uses VFP9.
Whole project is awesome so it would get much greater acceptance/usage
if it was backward compatible as much as possible.

Thks+++
Sergio