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

In SDI how many view's are attached to document object and in MDI how many view's are attached to Document object?

2 Answers   Wipro,


Difference between Cclint DC & Cpaint Dc

6 Answers   E Logic,


how does conditionally close the Dialog Box ?

2 Answers   Infotech,


how u can move CDC pointer to one line in cview?

2 Answers  


What is the command routing in MFC framework?

3 Answers  






What is model and modeless dialog box ? Give some examples?

2 Answers   Mphasis,


Hi All, I have created one MFC Dialog Based application.now if i am running the application its working fine,instead of closing he application i minimized the application,if i run the application again,i am getting the Dialog. I want to prevent the calling of application multiple times. please give me the code and let me know in which method i need to make changes. Praveer

7 Answers   HP,


How do I create a dialog box in mfc?

0 Answers  


1)set the Title for The File DialogBox, in MFC?

1 Answers  


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

2 Answers  


Difference between Debug and Release versions?

4 Answers  


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

5 Answers   Dover,


Categories