Link to home
Create AccountLog in
Avatar of rickatseasoft
rickatseasoft

asked on

Remove box around ICON Button

I have a toolbar on which I am creating a CButton, using SetIcon().  The button is created with BS_FLAT|BS_ICON, and works perfectly with one exception.  It has a heavy line around the button, and I don't want that.

Is there some way to remove that line?

Thanks in advance, Rick
SOLUTION
Avatar of jkr
jkr
Flag of Germany image

Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
See answer
Avatar of rickatseasoft
rickatseasoft

ASKER

jkr:

I tried what you suggested, and it didn't work.  This is not the only CButton on the toolbar, others have been created and added, but they are of a different type.  This is the only button, so far, that is BS_ICON, and I had to create my own derived class to create and display it.

Just so I am clear, the button is outlined by a thin black line.  For a CDialog, I would set the style to BORDER:NONE.  I wonder if that is the solution here: use one of the CWnd methods to remove the border.  If I don't get some ideas here, I'll try that next.

Rick
ASKER CERTIFIED SOLUTION
Link to home
membership
Create a free account to see this answer
Signing up is free and takes 30 seconds. No credit card required.
The solution ended up being

      Button.SetFlat(TRUE,TRUE);

Thanks for helping, Rick