Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

ONOK wont work in a prop-page

Posted on 2000-04-11
5
Medium Priority
?
191 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

Moving data to the cloud? Find out if you’re ready

Before moving to the cloud, it is important to carefully define your db needs, plan for the migration & understand prod. environment. This wp explains how to define what you need from a cloud provider, plan for the migration & what putting a cloud solution into practice entails.

Question has a verified solution.

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

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. …
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.
Want to learn how to record your desktop screen without having to use an outside camera. Click on this video and learn how to use the cool google extension called "Screencastify"! Step 1: Open a new google tab Step 2: Go to the left hand upper corn…

722 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