Solved

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

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

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Question has a verified solution.

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

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…
Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
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…

778 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