How do i go about creating an app in mfc where there is a series of buttons and when you press one it loads an image, then if you press another one a different image loads?
i am using vc++ 2008 to do this
Sarlacc
0
Newbie Poster
Recommended Answers
Jump to PostWell you need to give us a starting point as to what you have, my suggestion is that you have an image placeholder thingy, and then change the source of it when each button is pressed, ofcourse I can't use any technical names because I dis-like MFC :)
Chris
Jump to PostDid you build the dialog with the vs2008 resource editor?
If yes, click the right mouse button while selecting the dialog in the resource editor and create a dialog class. After that double click the button and create an event handler as member of your new dialog class.
Jump to Postyou need to write an event handler for each of those buttons. Inside the event handler is where you put the code to load and display the image you want. As I recall, to create an event handler function for a button just right-click the button and you will see …
All 10 Replies
Freaky_Chris
299
Master Poster
Sarlacc
0
Newbie Poster
jencas
Sarlacc
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Sarlacc
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Sarlacc
0
Newbie Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
Sarlacc
0
Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.