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

If there is more than 100 control in a window how we can change the Taborder of a controls

4 Answers   Satyam,


how can u change button shape at run time

3 Answers   Samsung,


How to handle dynamic menus in mfc? What happens when client calls cocreateinstance?

0 Answers  


1)To Remove WS_MINIMIZEBOX in a Frame ?

1 Answers  


How we call a dialog in another dialog?

2 Answers  






Difference between Debug and Release versions?

4 Answers  


I can i set size of integer variable should be fixed for different operating systems(Ex i want integer size is 2bytes in OS)

2 Answers   Invensys,


1.Get string1,string2,string3 1.add string1 and 2,string1 and 3. 2.replace vowels with T 3.count number of T. 4.remove T 5.COPY string1 to stringf. 6.restore string1. print the following 1.Number of T 2.StringF 3.string1+string2+string3 Use pointers and functions

1 Answers  


How to convert a CString variable to char* or LPTSTR?

5 Answers   Dover,


What is LoadLibrary function returns?

7 Answers  


what is the difference between SDI and MDI

15 Answers   CMC, HCL, Siemens,


How to handle RTTI in MFC ?

1 Answers  


Categories