Click here to Skip to main content
16,016,500 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionStopping windows shutdown in C++./MFC? Pin
Kushagra Tiwari16-Sep-09 22:50
Kushagra Tiwari16-Sep-09 22:50 
AnswerRe: Stopping windows shutdown in C++./MFC? Pin
«_Superman_»16-Sep-09 23:06
professional«_Superman_»16-Sep-09 23:06 
GeneralOT Pin
CPallini16-Sep-09 23:35
mveCPallini16-Sep-09 23:35 
GeneralRe: OT Pin
«_Superman_»16-Sep-09 23:37
professional«_Superman_»16-Sep-09 23:37 
GeneralRe: OT Pin
ThatsAlok16-Sep-09 23:48
ThatsAlok16-Sep-09 23:48 
AnswerRe: Stopping windows shutdown in C++./MFC? Pin
Randor 17-Sep-09 0:27
professional Randor 17-Sep-09 0:27 
GeneralRe: Stopping windows shutdown in C++./MFC? Pin
Kushagra Tiwari17-Sep-09 0:43
Kushagra Tiwari17-Sep-09 0:43 
GeneralRe: Stopping windows shutdown in C++./MFC? Pin
David Crow17-Sep-09 2:18
David Crow17-Sep-09 2:18 
Kushagra Tiwari wrote:
BOOL CMyShutDownDlg::OnQueryEndSession()
{

ShellExecuteA(NULL, "open","abc.exe", NULL, NULL, SW_SHOWNORMAL);
::MessageBox(NULL,_T("Test"),_T("I stopped shutdown"),MB_OK);
return FALSE;
}


How about:

CMyShutDownDlg::OnQueryEndSession()
{
    PostMessage(MY_MESSAGE);
    return FALSE;
}
  
CMyShutDownDlg::MyMessageHandler()
{
    ShellExecuteA(NULL, "open","abc.exe", NULL, NULL, SW_SHOWNORMAL);
}
You might also consider using TRACE() instead of MessageBox() for such debugging.

"Old age is like a bank account. You withdraw later in life what you have deposited along the way." - Unknown

"Fireproof doesn't mean the fire will never come. It means when the fire comes that you will be able to withstand it." - Michael Simmons


GeneralRe: Stopping windows shutdown in C++./MFC? Pin
Kushagra Tiwari17-Sep-09 3:18
Kushagra Tiwari17-Sep-09 3:18 
GeneralRe: Stopping windows shutdown in C++./MFC? Pin
David Crow17-Sep-09 3:27
David Crow17-Sep-09 3:27 
QuestionRe: Stopping windows shutdown in C++./MFC? Pin
Kushagra Tiwari17-Sep-09 20:24
Kushagra Tiwari17-Sep-09 20:24 
QuestionRe: Stopping windows shutdown in C++./MFC? Pin
David Crow18-Sep-09 4:18
David Crow18-Sep-09 4:18 
QuestionHow to load PDF file on any button click in VC++? Pin
deadlyabbas16-Sep-09 22:32
deadlyabbas16-Sep-09 22:32 
AnswerRe: How to load PDF file on any button click in VC++? Pin
Nuri Ismail16-Sep-09 22:46
Nuri Ismail16-Sep-09 22:46 
GeneralRe: How to load PDF file on any button click in VC++? Pin
deadlyabbas16-Sep-09 23:12
deadlyabbas16-Sep-09 23:12 
GeneralRe: How to load PDF file on any button click in VC++? Pin
Nuri Ismail17-Sep-09 0:50
Nuri Ismail17-Sep-09 0:50 
AnswerRe: How to load PDF file on any button click in VC++? Pin
CPallini16-Sep-09 22:51
mveCPallini16-Sep-09 22:51 
GeneralRe: How to load PDF file on any button click in VC++? Pin
deadlyabbas16-Sep-09 23:36
deadlyabbas16-Sep-09 23:36 
AnswerRe: How to load PDF file on any button click in VC++? Pin
David Crow17-Sep-09 2:25
David Crow17-Sep-09 2:25 
AnswerRe: How to load PDF file on any button click in VC++? Pin
ThatsAlok16-Sep-09 23:49
ThatsAlok16-Sep-09 23:49 
GeneralRe: How to load PDF file on any button click in VC++? Pin
deadlyabbas17-Sep-09 0:04
deadlyabbas17-Sep-09 0:04 
QuestionAbout Class CImage::GetPixel [modified] Pin
zhong_min16-Sep-09 21:54
zhong_min16-Sep-09 21:54 
AnswerRe: About Class CImage::GetPixel Pin
CPallini16-Sep-09 22:18
mveCPallini16-Sep-09 22:18 
GeneralRe: About Class CImage::GetPixel Pin
zhong_min16-Sep-09 22:44
zhong_min16-Sep-09 22:44 
GeneralRe: About Class CImage::GetPixel Pin
CPallini16-Sep-09 23:32
mveCPallini16-Sep-09 23:32 

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.