Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Video Display and Graphics
Message
From
05/03/1999 10:12:57
 
 
General information
Forum:
Visual FoxPro
Category:
Forms & Form designer
Miscellaneous
Thread ID:
00194398
Message ID:
00194474
Views:
19
>>To All:
>>
>>I know this has been cussed and discussed before but I could not find the threads on my particular problem.
>>
>>I have developed an application and my video setting are 16 bit high color. But if I run this on a computer with setting of 256 colors or less the screens and images change color. I can understand why, but what do you do to make an application compatible with different display settings? Does Visual Basic handle is problem better.
>>
>
>You have a choice - design to the least common denominator that you're willing to support (in this case, the 256 color mode) or create color mappings for each color depth and switch them as needed. The best way to determine the color depth is using the Win32 API call GetDeviceCaps() to retrieve the BITPIXEL property for the current Display as follows:
>
>
DECLARE INTEGER CreateDC IN WIN32API ;
>   STRING @ lpszDriver, ;
>   INTEGER lpszDevice, ;
>   INTEGER lpszOutput, ;
>   INTEGER lpInitData
>LOCAL hDCScreen
>hDCScreen = CreateDC('DISPLAY'+CHR(0),0,0,0)
>DECLARE INTEGER GetDeviceCaps IN WIN32API ;
>   INTEGER hDC, ;
>   INTEGER nIndex
>#DEFINE BITSPIXEL 12
>? GetDeviceCaps(hDCScreen,BITSPIXEL)
>
>
>There are a ton of functions to handle color mapping; The Windows 98 Developer's Guide is a good reference, as are the entries under the topic Device Context Functions in the MSDN.

This all sounds quite complex. I might opt for requiring certain minimum hardware.

Thanks
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform