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

1)How to create ToolTip in MFC?

2 Answers  


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

1 Answers   HCL,


What is the difference between ASSERT and VERIFY?

2 Answers  


List out the parameters of WinMain Function.

2 Answers   Mphasis,


what is the use of CWinApp class?

3 Answers   Mphasis,






1)How to load an icon on a button as Dynamically ?

1 Answers   HCL,


What is the base class for MFC Framework ?

4 Answers  


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

1 Answers  


How do you change the properties for a tree view control that is part of the CTreeView class?

1 Answers  


Have you ever used win32 APIs ?

4 Answers   Microsoft,


WHAT IS DIFFERENT BETWEN RELEASE MODE & DEBUGGING MODE

4 Answers   Google, Microsoft, TCS,


What four types of properties are supported by an ActiveX control?

1 Answers  


Categories