Click here to Skip to main content
15,910,083 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Random Name Generator Pin
Chuck Vought14-Aug-09 10:36
Chuck Vought14-Aug-09 10:36 
GeneralRe: Random Name Generator Pin
sashoalm15-Aug-09 4:20
sashoalm15-Aug-09 4:20 
GeneralRe: Random Name Generator Pin
Chuck Vought15-Aug-09 13:35
Chuck Vought15-Aug-09 13:35 
Questionflowing strings on BMP image of SDI View window? Pin
rambojanggoon12-Aug-09 21:39
rambojanggoon12-Aug-09 21:39 
AnswerRe: flowing strings on BMP image of SDI View window? Pin
KarstenK12-Aug-09 22:04
mveKarstenK12-Aug-09 22:04 
Questionhow to display many picture in 1 dialog Pin
DevelopmentNoob12-Aug-09 19:32
DevelopmentNoob12-Aug-09 19:32 
AnswerRe: how to display many picture in 1 dialog Pin
DevelopmentNoob12-Aug-09 19:42
DevelopmentNoob12-Aug-09 19:42 
GeneralRe: how to display many picture in 1 dialog Pin
Code-o-mat12-Aug-09 21:27
Code-o-mat12-Aug-09 21:27 
You should be a bit more specific about your problem. Just saying something like "i have a button and if i press it what happens is not what i want, how can i fix it" won't tell us much about the actual problem. Show us some code snipplet, how do you load images into your 4 picture controls? Also, by "first image disappears" do you mean the newly loaded image "overwrites" the first one or the first one simly disappears from sight?
Since you say you have 4 pic controls and 4 buttons i guess that each pic control has a button which if you press, an image should be loaded into the corresponding picture control. I also guess that if you press the second button, not your second pic control gets the image but your first, and that is your problem. If so, i can generally think of 3 things that could cause this:
1. All 4 of your buttons have the same command ID (or at least, some buttons share the same command ID), thus, no matter which button you press, your program will get the same command ID and execute the same handler function which loads and image into the first picture control. Make your buttons have different command IDs so you can differentiate between them in code.
2. In the message map you specified the same function as a message handler for the buttons, so whichever button is pressed, the same function will be executed and will load the picture in the first picture control overwriting whatever was there previously.
3. Copy-paste bug, you have separate command IDs and separate handlers for your buttons but you copy-pasted the same code into each message handler and forgot to change the needed parts to make the handler load the image into the picture control belonging to the actual button, so whenever a button is pressed, the same code is executed and loads the picture into the first picture control.

Does any of this make sense?

> The problem with computers is that they do what you tell them to do and not what you want them to do. <
> Life: great graphics, but the gameplay sux. <

GeneralRe: how to display many picture in 1 dialog Pin
DevelopmentNoob12-Aug-09 23:45
DevelopmentNoob12-Aug-09 23:45 
GeneralRe: how to display many picture in 1 dialog Pin
Code-o-mat13-Aug-09 0:08
Code-o-mat13-Aug-09 0:08 
GeneralRe: how to display many picture in 1 dialog [modified] Pin
DevelopmentNoob13-Aug-09 15:24
DevelopmentNoob13-Aug-09 15:24 
GeneralRe: how to display many picture in 1 dialog Pin
Code-o-mat13-Aug-09 20:59
Code-o-mat13-Aug-09 20:59 
GeneralRe: how to display many picture in 1 dialog Pin
DevelopmentNoob13-Aug-09 21:22
DevelopmentNoob13-Aug-09 21:22 
GeneralRe: how to display many picture in 1 dialog Pin
Code-o-mat13-Aug-09 21:43
Code-o-mat13-Aug-09 21:43 
GeneralRe: how to display many picture in 1 dialog Pin
DevelopmentNoob13-Aug-09 22:35
DevelopmentNoob13-Aug-09 22:35 
GeneralRe: how to display many picture in 1 dialog Pin
Code-o-mat13-Aug-09 22:39
Code-o-mat13-Aug-09 22:39 
AnswerRe: how to display many picture in 1 dialog Pin
CPallini12-Aug-09 21:03
mveCPallini12-Aug-09 21:03 
QuestionComboBox Pin
kumar sanghvi12-Aug-09 19:25
kumar sanghvi12-Aug-09 19:25 
AnswerRe: ComboBox Pin
Bacon Ultimate Cheeseburger12-Aug-09 19:51
Bacon Ultimate Cheeseburger12-Aug-09 19:51 
GeneralRe: ComboBox Pin
kumar sanghvi12-Aug-09 19:59
kumar sanghvi12-Aug-09 19:59 
GeneralRe: ComboBox Pin
Bacon Ultimate Cheeseburger12-Aug-09 20:26
Bacon Ultimate Cheeseburger12-Aug-09 20:26 
GeneralRe: ComboBox Pin
kumar sanghvi13-Aug-09 21:49
kumar sanghvi13-Aug-09 21:49 
QuestionHow i can insert image on Bitmap Pin
002comp12-Aug-09 19:00
002comp12-Aug-09 19:00 
AnswerRe: How i can insert image on Bitmap Pin
Joe Woodbury12-Aug-09 19:22
professionalJoe Woodbury12-Aug-09 19:22 
GeneralRe: How i can insert image on Bitmap Pin
002comp12-Aug-09 19:55
002comp12-Aug-09 19:55 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.