I'm using AcuCobol v6.1 on Windows 2000, and I'm having a hell of a time setting the background color of the window to a color other than the 16 default ones they have.
Acu provides the w$palette function in order to assign an RGB value to any of the default color "slots", and then I'm supposedly able to use this when displaying the window, but no matter what I do the color is always white. Any ideas?
I don't know how many ACU Cobol programmers there are out there, but if one of you is reading this, and you know the answer, please type it up so I can stop agonizing over this
Here's the code:
Acu provides the w$palette function in order to assign an RGB value to any of the default color "slots", and then I'm supposedly able to use this when displaying the window, but no matter what I do the color is always white. Any ideas?
I don't know how many ACU Cobol programmers there are out there, but if one of you is reading this, and you know the answer, please type it up so I can stop agonizing over this
Here's the code:
Code:
COPY "PALETTE.DEF"
display standard graphical window erase
lines 24 size 80
* this amounts to a sort of yellow
move 236 to wpal-red
move 245 to wpal-green
move 46 to wpal-blue
* show the user the chosen color and let him change it
* if he wants to
call "w$palette"
using wpalette-choose-color,
wpalette-data
giving my-color-var
end-call
* store the rbg color code in color slot #3
move 3 to wpal-color-id
call "w$palette"
using wpalette-set-color,
wpalette-data
giving my-color-var
end-call
display floating window erase
lines 10 size 30,
color wpal-color-id
title-bar, with system menu,
handle is first-float-handle.