I am trying to create a MFC application to create picture viewer software. I am able to select the folder and display all the images in it at a stretch. I want to implement pause, stop, next, previous options to it. As of now, when the images are running rest of the buttons and even the menu is disabled.
I hope I made the problem clear.
I am using Visual studio 2008.
Can anyone help me out.
[edit]
Hi there,
I am sorry for coming back after so much delay. Thanks for the interest in my question. I am adding code here for review.
void CCA_ToolDlg::OnBnClickedPlay()
{
HANDLE hFind;
string strPrefix;
WIN32_FIND_DATA FindData;
char pattern[150];
sprintf(pattern, "%s\\*.jpg", ImagePath);
sprintf(ImagePath, "%s\\", ImagePath);
hFind = FindFirstFile(pattern, &FindData);
char *filename;
filename = (char *)calloc(2000,sizeof(char));
do
{
strPrefix = string(ImagePath);
strPrefix += FindData.cFileName;
sprintf(filename,"%s",strPrefix.c_str());
m_picCtrl.Load(CString(_T(filename)));
}while(FindNextFile(hFind, &FindData));
FindClose(hFind);
free(filename);
}
This is the function when i click on play button.
Now, when i am inside the do loop, All my dialog doesnt respond to any user inputs. I am using PictureCrtl to display the images.
So, how I can handle other button functions when this function is running.
Thanks all.
[/edit]