creating buttons in visual c++

hansraj's Avatar, Join Date: Mar 2010
Newbie Member
I am just a beginner trying to create buttons and integrate them, does any one has an idea of how to create the buttons and integrate it in our application. Also once imported how to work on those buttons, such as producing sound when a button is clicked by the user.
0
raju00003's Avatar, Join Date: Dec 2009
Newbie Member
Hi

I can able to create buttons , but i don't know how to add event handling at time

i hope this ll help 2 u for your update your knowledge

Add this code your initdialoag() function

Code:
CButton * button = new CButton;

CRect rect ( 10 ,10 ,100,50);

buttons->create("ButttonName",WS_VISIBLE|WS_CHILD,&rect,this,0);
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
You have to use the Message Map Macro to add events manually or can even use the MFC Wizard to add events for you.
0
raju00003's Avatar, Join Date: Dec 2009
Newbie Member
thanks shabbir ..
0
shabbir's Avatar, Join Date: Jul 2004
Go4Expert Founder
For what?