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!

window background color in AcuCobol

Status
Not open for further replies.

MuadDubby

Programmer
Sep 23, 1999
236
CA
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:

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.
 
Hi - are you still having this problem? I might be able to help.
Alfredo
 
Hi,

No, it's been ok for a while now. Their documentation was very unclear on how to do this, and their support staff actually took a couple of days to figure it out. But it works just fine now.

Thx [smile]
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top