Go4Expert

Go4Expert (http://www.go4expert.com/)
-   MFC (http://www.go4expert.com/forums/mfc/)
-   -   creating buttons in visual c++ (http://www.go4expert.com/forums/creating-buttons-visual-cpp-t21463/)

hansraj 23Mar2010 10:30

creating buttons in visual c++
 
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.

raju00003 24Mar2010 16:11

Re: creating buttons in visual c++
 
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);


shabbir 24Mar2010 16:54

Re: creating buttons in visual c++
 
You have to use the Message Map Macro to add events manually or can even use the MFC Wizard to add events for you.

raju00003 24Mar2010 17:05

Re: creating buttons in visual c++
 
thanks shabbir ..:2thumbsup

shabbir 24Mar2010 17:31

Re: creating buttons in visual c++
 
For what?


All times are GMT +5.5. The time now is 16:16.