Solved

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

Posted on 2002-06-25
4
198 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
  • 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

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Suggested Solutions

Title # Comments Views Activity
Host to IP 7 73
Shell script to login to remote m/c and execute commands 10 72
while loop over for loop 7 79
Not needed 13 57
Here is how to use MFC's automatic Radio Button handling in your dialog boxes and forms.  Beginner programmers usually start with a OnClick handler for each radio button and that's just not the right way to go.  MFC has a very cool system for handli…
In this article, I'll describe -- and show pictures of -- some of the significant additions that have been made available to programmers in the MFC Feature Pack for Visual C++ 2008.  These same feature are in the MFC libraries that come with Visual …
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.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

757 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

Need Help in Real-Time?

Connect with top rated Experts

17 Experts available now in Live!

Get 1:1 Help Now