1)How to change the size of a button at run time ?



1)How to change the size of a button at run time ?..

Answer / 106743013743

Hi,

below, code is running successfully, I hope that it might be
useful for you!!!!

BOOL Csample_button_name_changeDlg::OnInitDialog()
{
CDialog::OnInitDialog();

CButton *btnsample = (CButton *)GetDlgItem(IDC_BUTTON1);

//below, the Code to change Size of the button

btnsample->SetWindowPos(0,0,0,100,100,SWP_FRAMECHANGED);

return TRUE;
}


Code By Ctharam

Is This Answer Correct ?    1 Yes 1 No

Post New Answer

More MFC Interview Questions

what do you mean by psychic window?

2 Answers   Patni,


I want recent paper pattern for HP company?

0 Answers   HP,


In MFC By Using Communication Between Dialog Boxes,How Can We Send Message Of one Dialog Box To Another Dialog.?

3 Answers   Financial Technologies,


what is the use of Mutex and critical section

2 Answers  


What is the difference between the Encapsulation and Abstraction

25 Answers   HCL, Invensys, TCS, Wipro,


What is the base class for MFC Framework ?

4 Answers  


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

2 Answers  


What?s the difference between Modal and Modeless Dialog?

12 Answers   Jekson, Usl India,


Tell me the work of HTREDUCE and HTZOOM

1 Answers   E Logic,


How do I create a dialog box in mfc?

0 Answers  


Types of DLL's

11 Answers   Invensys,


If i derive a new class from CObject what are the basic features my derived wil get ?

4 Answers   Microsoft,


Categories