1)dynamic creation of a Button ?

Answers were Sorted based on User's Feedback



1)dynamic creation of a Button ?..

Answer / rishabh

CButton myButton1;

// Create a push button.
myButton1.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON, 
   CRect(10,10,100,30), pParentWnd, 1);

Is This Answer Correct ?    5 Yes 1 No

1)dynamic creation of a Button ?..

Answer / ctharam

BOOL Ctharam::OnInitDialog()
{

CButton* pLogin;

pLogin = (CButton*)GetDlgItem(IDOK);

pLogin->SetWindowTextA("Login");

}

Is This Answer Correct ?    3 Yes 12 No

Post New Answer

More MFC Interview Questions

19)how to set Back Ground Picture to a Dialog Box in MFC ?

1 Answers  


if both base and derived class have the constructors if i create an object for derive class which class constructor is executed first

10 Answers   Siemens, Symphony,


What is the difference between regular dlls and extended dlls?

2 Answers  


Explain in sort What is CTargetObject?

2 Answers  


what is the updated verssion in vc++

3 Answers   Aspect,


what message is sent to an application when the user presses the primary button?

1 Answers   University Exams,


What is LPCTSTR? What does LP denote it?

4 Answers  


What is the difference between workrer thread and UI thread

3 Answers   HCL,


Differ GetMessage, PostMessage & PeakMessage?

4 Answers   Symphony,


Hi can anyone explain about the synchronization objects types and where we are using in the code.

1 Answers  


What is a message map, and what is the advantage of a message map over virtual functions?

1 Answers  


Will there be any difference in the image buffer size if it is loaded in from CString to LPTSTR using GetBuffer()? lptstr = string.GetBuffer(0);

2 Answers  


Categories