I am a novice writing a simple program in Visual C++ Express and am
having an issue. I basically have several picture boxes of the same
size on top of each other with only one visible at a time. I have a
button that when clicked triggers an event that makes each picturebox
visible one at a time and plays a wav file associated with the image
in the picturebox. I have put an example of the code below:
//picturebox1 is already visible on the screen
PlaySound("c:\\picturebox1wave.wav",0,SND_SYNC|SND _FILENAME);
this->picturebox1->visible = false;
this->picturebox2->visible = true;
PlaySound("c:\\picturebox2wave.wav",0,SND_SYNC|SND _FILENAME);
this->picturebox2->visible = false;
this->picturebox3->visible = true;
PlaySound("c:\\picturebox3wave.wav",0,SND_SYNC|SND _FILENAME);
and so on......
The issue I have is that picturebox1 goes away after its wav file is
played as it should, but the screen remains blank until all the wav
files are played and then the last picturebox is displayed. None of
the intermediate pictureboxes are displayed while the associated wave
file is playing. Any suggestions on how to fix this? Thanks.