Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...


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

What is the base class for MFC

3 Answers   HCL,


i have created runtime menu -- ( admistrator ->managepackage,manage module). but now i want to open a dialog when i select manage package and any other diaolg when selecting manage module ( whole selection is at run time only ) . Please HELP .its urgently required

3 Answers   Patni,


What is LPCTSTR? What does LP denote it?

4 Answers  


Can you explaing the relashionship between document,frame and view ?

2 Answers  


what is message Testing ?

1 Answers   L&T,


How can i implement the dynamic menus in MFC plz give the code

2 Answers  


What are the types of button controls?

10 Answers  


Does the application have more than one object? If Yes, Briefly explain.

2 Answers   Soltius Infotech,


How can server communicate with more than one client

2 Answers   Invensys,


1)why we cant create more than one instance of the class Derived from CWinApp

5 Answers   Alstom,


What is mfc class hierarchy?

0 Answers  


What is the difference between hinsrtance and hprevinstance in WinMain function?

3 Answers  


Categories