I've been playing around with making a miniwindow library in Lua, and I was playing around with WindowRectOp for buttons and labels, and I find action 5(Draw Edge) pretty useful for buttons and such, however it's always gray, is there any way to change the color, both color arguments seem to effect how it's drawn and not what color it is. Also what is the code for the color it's filled with? So I can make the non-sunken labels match.
WindowRectOp
Posted by Cage_fire_2000 on Fri 17 Oct 2008 07:30 PM — 4 posts, 18,314 views.
Draw Edge probably uses the windows libraries. In other words, it would use two colors specified in the Display Properties > Appearance > Advanced screen. Don't ask me which two, though.
I assumed when I saw the gray boxes, when the colour wasn't specified anywhere, that it was using the Windows colour scheme (as my usual boxes were gray).
And this indeed proved to be the case, if you change the Display Properties -> Appearance -> Color Scheme to something else (eg. Maple) then the box drawn by WindowRectOp (5) takes on the new colour.
This is good if you want the buttons to agree with the user's colour scheme, not so good if you want a consistent look and feel.
if you want to make your own, with your own colours, you had better simulate the 3D look by getting a screen copy, looking at it magnified to see what they did (eg. darker lines, lighter lines), and build them up manually in your library.
And this indeed proved to be the case, if you change the Display Properties -> Appearance -> Color Scheme to something else (eg. Maple) then the box drawn by WindowRectOp (5) takes on the new colour.
This is good if you want the buttons to agree with the user's colour scheme, not so good if you want a consistent look and feel.
if you want to make your own, with your own colours, you had better simulate the 3D look by getting a screen copy, looking at it magnified to see what they did (eg. darker lines, lighter lines), and build them up manually in your library.
Well, I was using method 2 for drawing label backgrounds without the border, but I wanted it to match, but I just discovered GetSysColor() and have hopes that it'll fix my issue, as long as they match I don't really care too much. Although it does make the backcolor attribute pretty useless if you have a border, oh well.
Edit: Yeah, GetSysColor(15) seems to do the trick I think.
Edit: Yeah, GetSysColor(15) seems to do the trick I think.