I'm working on a GUI for a chess program using Win32, and my first thought was to make the board an 8X8 grid of buttons. However, I would prefer the squares on my board to be solid, single colors with no additional visual frills, while I haven't found a way to create a button that doesn't have a border around it. Is it possible to alter the appearance of a button arbitrarily, or are the borders unavoidable? If the latter, what other implementation could I look into for rendering a board that looks exactly how I want?
- Look into sub-classing controls and owner-draw controls.Richard Critten– Richard Critten2017-07-22 12:14:42 +00:00Commented Jul 22, 2017 at 12:14
- Yes, you can draw every pixel.Yakk - Adam Nevraumont– Yakk - Adam Nevraumont2017-07-22 12:23:50 +00:00Commented Jul 22, 2017 at 12:23
- The owner-drawn controls look like they're probably exactly what I need. I swear I looked around the documentation before asking, but haven't found it very intuitive to find things in when I don't know the name of what I'm looking for going in.Alex Kindel– Alex Kindel2017-07-22 12:28:29 +00:00Commented Jul 22, 2017 at 12:28
- Don't use a button. Paint your entire board directly. GUI controls are a good fit.David Heffernan– David Heffernan2017-07-22 13:27:24 +00:00Commented Jul 22, 2017 at 13:27
- @David Is there a specific kind of Win32 entity called a GUI control the same way there is one called a button? I'm not finding one searching for it on msdn.microsoft.comAlex Kindel– Alex Kindel2017-07-22 14:58:02 +00:00Commented Jul 22, 2017 at 14:58
| Show 10 more comments