>Hello Ed,
>
>>You can extract RGB values from the Win32 API - you may want to look at GetNearestColor() and GetSystemPaletteEntries() as tools to extract values from
>the user's system color scheme.
>
>Could you give more details on how to accomplish this?
GetSystemPaletteEntries() returns a pointer to an array of PALETTEENTRY structures, starting at a relative offset for a specified number of entries on the system palette. Each palette entry contains R, G and B values that can be fed to VFP. The API call is decalred in VFP as follows:
DECLARE INTEGER GetSystemPaletteEntries IN WIN32API ;
INTEGER hdc, ;
INTEGER uStartIndex, ;
INTEGER uEntries, ;
STRING @ LPAPALETEENTRY
You'll need to get the device context of the screen using CreateDC() to get the hDC (device context handle, an integer), and you'll need to preallocate a string variable at least as large as uEntries * the size of a PALETTEENTRY structure. You'd call it passing in the hdc, the start position in the system palette (0 is a good place to start), the number of entries to return and the preallocated string variable, which must be passed by reference (prefix the variable with an @). You then wander through the returned array pulling out the R, G and B values you want.
I don't have the strucutres here in front of me, but they're documented in the MSDN library docs, also available on MSDN OnLine.