• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 210
  • Last Modified:

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

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

  • 2
1 Solution
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);
Regardless, it's the user's responsibility to close 'em out.  If there is no useful comment, they should delete the questions.
india_bbAuthor Commented:
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
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now