Change appearance of bitmap button |
Post Reply |
Author | |
VC++PROGRAMMER
Newbie Joined: 29 June 2011 Status: Offline Points: 7 |
Post Options
Thanks(0)
Posted: 27 July 2011 at 9:34am |
Our company has been using Xtreme ToolkitPro v11.2.2 for 5 yrs to provide skin for our VC++ SDI application. We created bitmap buttons using the class CXTButton as follows:
/*********************************************************/ DDX_Control(pDX, IDC_RECORD, m_btRecord); // In ViewClass::OnCreate(LPCREATESTRUCT lpCreateStruct) Current CXTButton Button style required
It has to look like a normal cbutton with an image on it. We tried many methods but failed. Can anyone please please suggest a method to do this ?
Thanks.....
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Guess you need change m_btRecord.SetTheme(xtThemeOffice2003); to WinXP style. check Buttons sample for list of themes.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
VC++PROGRAMMER
Newbie Joined: 29 June 2011 Status: Offline Points: 7 |
Post Options
Thanks(0)
|
The issue was solved. Thanks for the quick reply...........
For those with similar issue, i have given my code below.....
/***RESOURCE.RC ***/
PUSHBUTTON "",IDC_RECORD,58,43,15,14 ,WS_GROUP
/*** VIEWCLASS.H ***/
CXTButton m_btRecord;
/*** VIEWCLASS.CPP ***/
/*** In ViewClass::::OnInitDialog( WPARAM, LPARAM ) ***/
m_btRecord.SetTheme(xtThemeDefault);
m_btRecord.SetXButtonStyle(BS_XT_WINXP_COMPAT); /*** In ViewClass::OnCreate(LPCREATESTRUCT lpCreateStruct) ***/
m_btRecord.SetBitmap( CSize(10,10), IDB_RECORD_NORMAL );
m_btRecord.SetBorderGap( 6 ); Hope this would help someone who is new to VC++ like me.
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |