Follow Our FB Page << CircleMedia.in >> for Daily Laughter. We Post Funny, Viral, Comedy Videos, Memes, Vines...


How you create a button dynamically?

Answers were Sorted based on User's Feedback



How you create a button dynamically?..

Answer / venkataramakrishna

1. Create a Object from CButton control. CButton m_ctlButton
2.
m_ctlButton.Create("OK",ES_CHILD|ES_VISIBLE,CRect(0,0,100,100),CWnd*
pParentWnd,MB_OK);

with this we can create the button by dynamically.

Is This Answer Correct ?    12 Yes 3 No

How you create a button dynamically?..

Answer / 106743013743

CButton myButton1, myButton2, myButton3, myButton4;

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

// Create a radio button.
myButton2.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_RADIOBUTTON,
CRect(10,40,100,70), pParentWnd, 2);

// Create an auto 3-state button.
myButton3.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_AUTO3STATE,
CRect(10,70,100,100), pParentWnd, 3);

// Create an auto check box.
myButton4.Create(_T("My button"), WS_CHILD|WS_VISIBLE|BS_AUTOCHECKBOX,
CRect(10,100,100,130), pParentWnd, 4);

Is This Answer Correct ?    1 Yes 0 No

Post New Answer

More MFC Interview Questions

how many types of messages are their

4 Answers   E Logic, TCS,


What is difference between the TCP/IP and UDP socket

5 Answers   Invensys,


What is the difference between GetMessage and PeekMessage ?

3 Answers  


1)does Frame Thickness in MFC?

1 Answers   winfoware,


2.create for 10 batch: Employee_Number Employee_name Employee_Dateofjoining Employee_address Employee_salary 1.select the employee name who deriving more than 10 thousand salary and joined before august 08. use structure and pointers

0 Answers   TCS,






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

1 Answers  


If application hangs while SendMessage is waiting for the result, how you handle it?

2 Answers  


What is the use of message map ?

5 Answers   TCS,


What are the advantages of using Doc/View or SDI over DialogBox

2 Answers  


Explain Doc/View architecture

6 Answers   Huawei,


How can update edit control data of an executing application from other application?

3 Answers   HP,


What is the difference between the ASSERT and VERIFY macros?

4 Answers  






Categories