Solved

how to make the sure that the exe file doesn't  disappear on pressing escape key?

Posted on 2002-06-25
4
203 Views
Last Modified: 2013-11-20
Hello experts,

   I have made a server-application which i want should always be in running mode.

I just wonder how i can assure that it doesn't disappear even if some one presses escape key by default
help me soon
I have coded my application in SDK

thank you
india_bb

0
Comment
Question by:india_bb
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 32

Expert Comment

by:jhance
ID: 7107113
0
 
LVL 3

Accepted Solution

by:
Crius earned 50 total points
ID: 7108078
Well, I read every one of those question links you posted jhance, and it looks like most are being addressed by Moondancer, or have not received answers that india_bb understood, or haven't received answers at all... So, in good faith:

Override PreTranslateMessage() and add the following before your return:

    if(pMsg->message == WM_KEYDOWN)
     if(pMsg->wParam == VK_ESCAPE)
         return TRUE;


So, it'll look something like:
BOOL CMyServerDialog::PreTranslateMessage(MSG* pMsg)
{
    if(pMsg->message == WM_KEYDOWN)
     if(pMsg->wParam == VK_ESCAPE)
         return TRUE;

    return CDialog::PreTranslateMessage(pMsg);
}
0
 
LVL 32

Expert Comment

by:jhance
ID: 7108273
Regardless, it's the user's responsibility to close 'em out.  If there is no useful comment, they should delete the questions.
0
 

Author Comment

by:india_bb
ID: 7116266
thank you very much Crius for ur kind help

I am also thankful to you for having faith on me


the solution u gave worked
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
This video will show you how to get GIT to work in Eclipse.   It will walk you through how to install the EGit plugin in eclipse and how to checkout an existing repository.
Nobody understands Phishing better than an anti-spam company. That’s why we are providing Phishing Awareness Training to our customers. According to a report by Verizon, only 3% of targeted users report malicious emails to management. With compan…

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question