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

What is CALLBACK? How it work? what is the advantage of CALLBACK, please explain with an example

6 Answers  


In VC++ How to transfer between one exe to another exe while running..

5 Answers   Wipro,


what is the meaning of constant FILE EXCEEDS LENGTH LIMIT while loading from ps file to vsam in the jcl?

0 Answers  


what is the difference between compiling and building?

1 Answers  


What is a message map?

1 Answers   Mphasis,






What is the difference between Synchronous sockets and asynchronous sockets?

2 Answers  


How you find memory leaks?

4 Answers   ABB,


1)dynamic creation of a Button ?

2 Answers   TCS,


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

4 Answers   Microsoft,


what is the use of CCmdTarget?

4 Answers   Siemens,


What is the difference between the Encapsulation and Abstraction

25 Answers   HCL, Invensys, TCS, Wipro,


1)At run-time, you can change the icon by calling the LoadIcon() function?

2 Answers  


Categories