Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - want to add border to CXTButton
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

want to add border to CXTButton

 Post Reply Post Reply
Author
Message
msthomas View Drop Down
Newbie
Newbie
Avatar

Joined: 14 August 2003
Location: United States
Status: Offline
Points: 1
Post Options Post Options   Thanks (0) Thanks(0)   Quote msthomas Quote  Post ReplyReply Direct Link To This Post Topic: want to add border to CXTButton
    Posted: 08 September 2003 at 9:38am

Hi,

I want to add a black border to a flat style CXTButton within a dialog box. I would be very grateful for details on how to do this.

I have subclassed the OK button of the dialog within OnInitDialog(). The result is that the OK button is white and flat (which is what I want) but it needs a border :-

m_ok_button.SubclassDlgItem(IDOK, this);
m_ok_button.SetColorFace(RGB(255, 255, 255) ); //white
m_ok_button.SetXButtonStyle(BS_XT_XPFLAT);

And the m_ok_button is declared as :-

CXTButton   m_ok_button

Thanks for any help.

Michael

 

michael
clownred software
Back to Top
camow View Drop Down
Newbie
Newbie


Joined: 30 March 2004
Status: Offline
Points: 8
Post Options Post Options   Thanks (0) Thanks(0)   Quote camow Quote  Post ReplyReply Direct Link To This Post Posted: 08 April 2004 at 5:27pm

I would like to do this also. It would allow me to standardize on CXTButton everywhere instead of CButton and let me do the things that should have been simple in the first place - like setting the face color.

But it seems like CXTButton isn't a superset of CButton in looks.  Because these are the only possible styles(?)

const UINT BS_XT_FLAT        &n bsp;     = 0x0001; // Draws a flat button.
const UINT BS_XT_SEMIFLAT       &nbs p;  = 0x0002; // Draws a semi-flat button.
const UINT BS_XT_TWOROWS         ;   = 0x0004; // Draws images and text are centered.

Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.188 seconds.