Solved

ONOK wont work in a prop-page

Posted on 2000-04-11
5
188 Views
Last Modified: 2013-11-20
I have a propertysheet with 4 pages.
I want return function locally in a control.
for example I have an edit control and when user enters while in it, I want to handle it
and still keep the sheet and page.
Only if they tab to ok button and return, then the dialog should close.
0
Comment
Question by:hasmet
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
  • 2
5 Comments
 
LVL 4

Expert Comment

by:inpras
ID: 2704185
Remove default property of UR property pages OK button.
0
 
LVL 1

Author Comment

by:hasmet
ID: 2704389
how ? I dont get it ?
0
 
LVL 1

Author Comment

by:hasmet
ID: 2704603
I am sorry, I have to reopen it, I just
can not understand your answer !
0
 
LVL 1

Expert Comment

by:MT_MU
ID: 2704767
Have you tryed overriding PreTranslateMessage?  

You should be able to do something like

BOOL CPropPAge::PreTranslateMessage(MSG* pMsg)
{
 if (pMsg->message == WM_KEYDOWN)
  {
    if (pMsg->wParam == WM_RETURN)
    {
      CWnd* pWnd = GetFocus();      
      if (::GetDlgCtrlID(pWnd->m_hWnd)) == MyControl)
      {
         // handle the return here
      }
    }
  }
}


0
 
LVL 4

Accepted Solution

by:
inpras earned 150 total points
ID: 2704776
Hi
Ok U do the folowing go to resource
go to prperties of UR edit box set the property want return U R prblem is solved and for other controls like push button U have to derive the class from CButton and override Pretranslate message in tpretranslate message check if message == WM_KEYDOWN and lParam == 0x13 then return FALSE thats all
Hope this helps
inpras
0

Featured Post

Get proactive database performance tuning online

At Percona’s web store you can order full Percona Database Performance Audit in minutes. Find out the health of your database, and how to improve it. Pay online with a credit card. Improve your database performance now!

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: The undo support, implementing a stack. Continuing from the eigth article about sudoku.   We need a mechanism to keep track of the digits entered so as to implement an undo mechanism.  This should be a ‘Last In First Out’ collec…
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.
Do you want to know how to make a graph with Microsoft Access? First, create a query with the data for the chart. Then make a blank form and add a chart control. This video also shows how to change what data is displayed on the graph as well as form…

634 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