Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

W$PALETTE

Status
Not open for further replies.

DWrightson

Programmer
Mar 23, 2006
1
CA
I'm using AcuCobol v6.1 on Windows 2000, and can't seem to set the background color of the window to a color other than the 16 default colors.

I call the W$PALETTE function to set the color, yet this yields a white window in the end.

I have copied code from a previous post which went unresolved, and am hoping for some help here. How do I set these background colors?

Thanks

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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top