Solved

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

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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

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: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
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.

910 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

20 Experts available now in Live!

Get 1:1 Help Now