gt0204b@prism.gatech.EDU (LO,KWOK TUNG BRIAN) (05/22/91)
I am trying to write a program to make the 16 static colors in a VGA configuration available, and remap them to form a continuous 16 levels gray scale. I know after executing SetSystemPaletteUse(hdc, SYSPAL_NOSTATIC), the palette manager should release all but pure black and white colors to the application with the focus. I did just that and then realized a palette with 16 gray colors. But it did not work, I even put in the UnrealizeObject() function as indicate in the SDK Prog Ref. Portion of my code is as followed : case WM_PAINT: hdc = BeginPaint(hwnd, &ps); SetSystemPaletteUse(hdc, SYSPAL_NOSTATIC); SelectPalette(hdc, hPal, 0); RealizePalette(hdc); Has anyone out there done this before ? Any suggestion would be appreciated. By the way, it works when I switch to a SuperVGA driver with 256 colors. I can really get 254 colors. :::::::::::::::::::::::::::::::::::: ::::::: ::: :#:::::::::::::::::::::::::::::::::: :::::: :: :#:::::::::::::::::::::::::::::::::: :::::: :: :: :#::::::::::::::#::::::::::::::::::: :::::: :: :: :#####:::#:###::::::###:::#:###::::: :::::: :: :: :#::::#:::#:::::#::#::#::::#:::#:::: :::::: :: :: :#::::#:::#:::::#::#::#::::#:::#:::: :: :: :#####::::#:::::#::###:##::#:::#:::: ::: :::