how can u change button shape at run time

Answers were Sorted based on User's Feedback



how can u change button shape at run time..

Answer / kishore kumar naik p

"Somil Vijay" is wrong here. SetWindowPos is used to resize
the dialog. "San" is right, see example below

CYourDialog::OnInitDialog()
{
....
CRgn oRgn;
oRgn.CreateEllipticRgn(10,10,100,100);

CWnd *pWnd = GetDlgItem(IDC_BUTTON_ID);

if(NULL != pWnd)
{
pWnd->SetWindowRgn(oRgn);
}
....
}

Instead of "CreateEllipticRgn" you can many other methods to
create the shape that is required for you.

Is This Answer Correct ?    9 Yes 0 No

how can u change button shape at run time..

Answer / san

Use SetWindowRgn function of the CWnd class. You could
specify the shape of the region as a parameter of this function.

Is This Answer Correct ?    6 Yes 0 No

how can u change button shape at run time..

Answer / somil vijay

Use Setwindowspos function of Cwnd class .Use this function
on Cbutton object.

BOOL CWnd::SetWindowPos(
const CWnd* pWndInsertAfter,
int x,
int y,
int cx,
int cy,
UINT nFlags
);

Is This Answer Correct ?    2 Yes 7 No

Post New Answer

More MFC Interview Questions

How to find the mouse entering an image?..while entering need to display next image...

4 Answers  


What is userdefine Messages in MFC?

1 Answers   HCL,


what is functioning of DIalodDataXchange ..?

0 Answers  


How can update edit control data of an executing application from other application?

3 Answers   HP,


What four types of properties are supported by an ActiveX control?

1 Answers  






Name the Synchronization objects?

2 Answers  


List out the parameters of WinMain Function.

2 Answers   Mphasis,


Psychic Window Technique

2 Answers   E Logic, Wild Net,


What is the command routing in MFC framework?

3 Answers  


1)How to create ToolTip in MFC?

2 Answers  


What is LoadLibrary function returns?

7 Answers  


how many types of classes are ther,what are that

7 Answers   L&T,


Categories