Solved

ONOK wont work in a prop-page

Posted on 2000-04-11
5
186 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Get filename and folder into excel 7 89
How do you programatically show and hide the Windows 10 On-Screen-Keyboard? 3 1,025
Process filename extension 3 218
changeXy challenge 13 98
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.
Have you tried to learn about Unicode, UTF-8, and multibyte text encoding and all the articles are just too "academic" or too technical? This article aims to make the whole topic easy for just about anyone to understand.
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.

751 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