Click here to Skip to main content
15,895,667 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Mouse Event Pin
CPallini1-Jun-09 3:02
mveCPallini1-Jun-09 3:02 
GeneralRe: Mouse Event Pin
Davitor1-Jun-09 19:26
Davitor1-Jun-09 19:26 
Questionreading a .pst file Pin
Anil Kumar.Arvapalli31-May-09 21:21
Anil Kumar.Arvapalli31-May-09 21:21 
AnswerRe: reading a .pst file Pin
randomrockers31-May-09 22:41
randomrockers31-May-09 22:41 
AnswerRe: reading a .pst file Pin
Stuart Dootson31-May-09 23:11
professionalStuart Dootson31-May-09 23:11 
Questionopening webcam with MFC Pin
randomrockers31-May-09 21:19
randomrockers31-May-09 21:19 
AnswerRe: opening webcam with MFC Pin
khan++31-May-09 22:33
khan++31-May-09 22:33 
Questionusing ShellExecute to close... Pin
randomrockers31-May-09 21:17
randomrockers31-May-09 21:17 
Hi, i am using ShellExecute to open an image. The image is opened using Windows Picture and Fax Viewer. Now, I have a button, in my dialog(the UI). I want to close the Windows Picture and Fax Viewer, got any idea? here's my code... please help. its kinda urgent... been stuck on this for 3 days... googled it, but nopthing relevant came out.

void CDesignDlg::OnImage()
{
// TODO: Add your control notification handler code here
CFileDialog m_ldFile(TRUE);

{
if ( ! onStart )
{
m_button.SetWindowText("Start Image");
}
else
{
m_button.SetWindowText("Stop Image");
}

onStart ^= 1; // make onStart 0, or 1 respectively

}


if (onStart==0){

if (m_ldFile.DoModal() ==IDOK)
{


CString abc= m_ldFile.GetPathName();
SHELLEXECUTEINFO tiff;
tiff.cbSize = sizeof(SHELLEXECUTEINFO);
tiff.fMask = NULL;
tiff.hwnd = NULL;
tiff.lpVerb = "open";
tiff.lpFile = abc;
tiff.lpParameters= NULL;
tiff.nShow = SW_SHOWNORMAL;
tiff.hInstApp = NULL;
tiff.lpIDList = NULL;
tiff.lpClass = NULL;
tiff.hkeyClass = NULL;
tiff.dwHotKey = NULL;
tiff.hIcon = NULL;
tiff.hProcess = NULL;
tiff.lpDirectory = NULL;
int ReturnCode = ::ShellExecuteEx(&tiff);

UpdateData(TRUE);

}}
else
{
//what should be put here???
}


}
AnswerRe: using ShellExecute to close... Pin
tolw31-May-09 21:35
tolw31-May-09 21:35 
GeneralRe: using ShellExecute to close... Pin
randomrockers31-May-09 22:17
randomrockers31-May-09 22:17 
GeneralRe: using ShellExecute to close... Pin
tolw31-May-09 22:23
tolw31-May-09 22:23 
GeneralRe: using ShellExecute to close... Pin
randomrockers31-May-09 22:29
randomrockers31-May-09 22:29 
GeneralRe: using ShellExecute to close... Pin
tolw31-May-09 22:44
tolw31-May-09 22:44 
GeneralRe: using ShellExecute to close... Pin
randomrockers31-May-09 22:57
randomrockers31-May-09 22:57 
GeneralRe: using ShellExecute to close... Pin
CPallini31-May-09 23:04
mveCPallini31-May-09 23:04 
GeneralRe: using ShellExecute to close... Pin
randomrockers31-May-09 23:22
randomrockers31-May-09 23:22 
GeneralRe: using ShellExecute to close... Pin
tolw31-May-09 23:36
tolw31-May-09 23:36 
GeneralRe: using ShellExecute to close... Pin
tolw31-May-09 23:34
tolw31-May-09 23:34 
AnswerRe: using ShellExecute to close... Pin
CPallini31-May-09 21:48
mveCPallini31-May-09 21:48 
QuestionRefresh Desktop programatically Pin
krishnakumartm31-May-09 21:05
krishnakumartm31-May-09 21:05 
AnswerRe: Refresh Desktop programatically Pin
«_Superman_»31-May-09 21:10
professional«_Superman_»31-May-09 21:10 
AnswerRe: Refresh Desktop programatically Pin
khan++31-May-09 21:59
khan++31-May-09 21:59 
QuestionString check Pin
pandit8431-May-09 20:55
pandit8431-May-09 20:55 
AnswerRe: String check Pin
«_Superman_»31-May-09 21:17
professional«_Superman_»31-May-09 21:17 
AnswerRe: String check Pin
Nibu babu thomas31-May-09 22:13
Nibu babu thomas31-May-09 22:13 

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.