how can u change button shape at run time
Answers were Sorted based on User's Feedback
"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 |
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 |
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 |
Which Macro is a Super set of other two macro DECLARE_SERIAL,DECLARE_DYNAMIC and DECLARE_DYNCREATE. ?
Why not virtual functions to handle messages?
What is the difference between the Encapsulation and Abstraction
25 Answers HCL, Invensys, TCS, Wipro,
what is the updated verssion in vc++
How to update windows title bar dynamically?
plzz tell me what we can do and dont in tally ERP & sap business one?
Tell me the work of HTREDUCE and HTZOOM
How to setup a timer?
Will there be any difference in the image buffer size if it is loaded in from CString to LPTSTR using GetBuffer()? lptstr = string.GetBuffer(0);
What view class enables you to use an edit control as a view?
What is mfc class hierarchy?
What?s the difference between Modal and Modeless Dialog?