0

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?

15
  • Look into sub-classing controls and owner-draw controls. Commented Jul 22, 2017 at 12:14
  • Yes, you can draw every pixel. Commented 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. Commented Jul 22, 2017 at 12:28
  • Don't use a button. Paint your entire board directly. GUI controls are a good fit. Commented 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.com Commented Jul 22, 2017 at 14:58

1 Answer 1

2

Create the buttons with the BS_OWNERDRAW style and handle the WM_DRAWITEM message.

Sign up to request clarification or add additional context in comments.

Comments

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.