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 |
visual Pogramming c++ coding for create a paint application.. (Please someone help me)
what is the use of CWinApp class?
1)How to change a text of a button as Dynamically?
plzz tell me what we can do and dont in tally ERP & sap business one?
what is the updated verssion in vc++
What is document-view architecture ? Give me one real time example for SDI ?
1) How do you Destroy a Dialog Box ?
1)dynamic creation of a Button ?
What is the use of UpdateData funciton ?
what message is sent to an application when the user presses the primary button?
2.create for 10 batch: Employee_Number Employee_name Employee_Dateofjoining Employee_address Employee_salary 1.select the employee name who deriving more than 10 thousand salary and joined before august 08. use structure and pointers
What is the use of OninitDialog ?