Solved

Dialog based application

Posted on 1999-01-10
2
165 Views
Last Modified: 2013-11-20
The dialog has some edit controls. When ever I press the INSERT key the execution  control should go to some function that is defined by me.How to write code for this key?
Note: The application is  dialog based  VC++ application.
0
Comment
Question by:chowdary010899
2 Comments
 

Author Comment

by:chowdary010899
ID: 1327475
Please send as earley as posible
0
 
LVL 4

Accepted Solution

by:
pagladasu earned 0 total points
ID: 1327476
Use claswwizard and override the PreTranslateMEssage() as follows:

BOOL CMyDlg::PreTranslateMessage(MSG* pMsg)
{
      // TODO: Add your specialized code here and/or call the base class
      if(pMsg->message==WM_KEYDOWN){
            if(pMsg->wParam==VK_INSERT)
                  MessageBox("INSERT PRESS");//call your own function
      }
      return CDialog::PreTranslateMessage(pMsg);
}

hope this helps
pagladasu
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

Suggested Solutions

Title # Comments Views Activity
Need to retreive data from .TFS file exported by DVR 8 198
Strange date stored 22 123
method notes when mouse over in eclipse 5 87
EvenOdd challenge 10 108
Introduction: Database storage, where is the exe actually on the disc? Playing a game selected randomly (how to generate random numbers).  Error trapping with try..catch to help the code run even if something goes wrong. Continuing from the seve…
Exception Handling is in the core of any application that is able to dignify its name. In this article, I'll guide you through the process of writing a DRY (Don't Repeat Yourself) Exception Handling mechanism, using Aspect Oriented Programming.
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.
Established in 1997, Technology Architects has become one of the most reputable technology solutions companies in the country. TA have been providing businesses with cost effective state-of-the-art solutions and unparalleled service that is designed…

773 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