Solved

Dialog based application

Posted on 1999-01-10
2
163 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

6 Surprising Benefits of Threat Intelligence

All sorts of threat intelligence is available on the web. Intelligence you can learn from, and use to anticipate and prepare for future attacks.

Join & Write a Comment

Suggested Solutions

This is to be the first in a series of articles demonstrating the development of a complete windows based application using the MFC classes.  I’ll try to keep each article focused on one (or a couple) of the tasks that one may meet.   Introductio…
Introduction: Finishing the grid – keyboard support for arrow keys to manoeuvre, entering the numbers.  The PreTranslateMessage function is to be used to intercept and respond to keyboard events. Continuing from the fourth article about sudoku. …
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.
You have products, that come in variants and want to set different prices for them? Watch this micro tutorial that describes how to configure prices for Magento super attributes. Assigning simple products to configurable: We assigned simple products…

760 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

19 Experts available now in Live!

Get 1:1 Help Now