![]() |
Resizing custom controls |
Post Reply
|
| Author | |
Simon HB9DRV
Senior Member
Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
Quote Reply
Topic: Resizing custom controlsPosted: 27 July 2008 at 4:47am |
|
Hi,
Using ON_XTP_CREATECONTROL I create my own custom control.
I want to resize this later on - how do I resize my control and get the new size displayed in the toolbar?
m_rotatorAzimValue is derrived from CWnd.
//
// Create the static control. // CRect rect(0,0,100,16); if (!m_rotatorAzimValue.Create(NULL,
NULL, WS_CHILD | WS_VISIBLE | WS_CLIPSIBLINGS | WS_CLIPCHILDREN, rect, this, ID_AZIM_VALUE, NULL)) { return FALSE; } //
// Create a CXTPControlCustom*. // CXTPControlCustom* pControlAzimValue = CXTPControlCustom::CreateControlCustom(&m_rotatorAzimValue); //
// Set the margins of the control. // pControlAzimValue->SetBorders(3, 0, 3, 0); pControlAzimValue->SetVerticalPositionOption(xtpVerticalHide); pControlAzimValue->SetFlags(xtpFlagManualUpdate); lpCreateControl->pControl = pControlAzimValue; |
|
|
Simon HB9DRV
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 July 2008 at 2:51am |
|
Hi,
You need find custom control that was created (pCommandBars->FindControl) and change its size
pControl->SetWidth(...);
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
Simon HB9DRV
Senior Member
Joined: 07 July 2005 Location: Switzerland Status: Offline Points: 458 |
Post Options
Thanks(0)
Quote Reply
Posted: 28 July 2008 at 3:09am |
OK - I thought I tried that - will have another go, sorry to waste your time.
|
|
|
Simon HB9DRV
|
|
![]() |
|
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 |