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

How you create a button dynamically?

2 Answers  


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

2 Answers  


What is the base class for MFC Framework ?

4 Answers  


What is the use of UpdateData funciton ?

7 Answers  


what is the size of a process

2 Answers   E Logic, IBM,






what is message Testing ?

1 Answers   L&T,


Tell me about different kinds of synchranization objects ?

6 Answers  


is there any class which is not derived from Cobject

11 Answers   Patni,


Tell me the different controls in MFC ?

5 Answers  


What is Multithreading

1 Answers   Invensys,


what are the feauters of CObject

4 Answers   Siemens, Wipro,


1)How to change a text of a button as Dynamically?

1 Answers   HCL,


Categories