1

Is there any way of removing the visual effect of clicking a CButton?

I want to put two CButtons with BMPs side by side so that they form a bigger image, but I want to remove the visual effect of the click - that is the image being pressed. How can I do that?

edtheprogrammerguy
  • 5,957
  • 6
  • 28
  • 47
GreatDane
  • 683
  • 1
  • 9
  • 31
  • 1
    I'm fascinated to know why you want to do this... :) – user1793036 May 30 '14 at 00:56
  • 3
    Why buttons? Just use two static controls with `SS_BITMAP | SS_NOTIFY` style. Static controls don't produce any visual effects, when clicked or otherwise (hence "static"). – Igor Tandetnik May 30 '14 at 01:50
  • 1
    Based on this question and [your previous question](http://stackoverflow.com/q/23935818/2065121) this sounds like [the XY problem](http://meta.stackexchange.com/a/66378) - maybe its better to explain what you want to achieve, it sounds to me like you want clickable areas on an image? – Roger Rowland May 30 '14 at 06:13

1 Answers1

1

Use the same image for the Up and Down states of the button. That way it would look the same whether pressed or not. You will have to use the CBitmapButton class, however, which derives from CButton. http://msdn.microsoft.com/en-us/library/a3y45xs0.aspx

There are 4 states of the button: UP, DOWN, FOCUS, DISABLED and each can have its own image (or not). http://msdn.microsoft.com/en-us/library/6y6acs49.aspx

edtheprogrammerguy
  • 5,957
  • 6
  • 28
  • 47