Solved

How to change the default Ok behavior in a propertysheet

Posted on 1997-02-21
3
232 Views
Last Modified: 2013-11-20
In my application that uses a property sheet with property pages, I want to change the ENTER key to act as a TAB, instead of trigging the Ok button. I have tried to use a WH_KEYBOARD hook in a class derived from CPropertyPage and change the keyboard character from VK_RETURN to VK_TAB in the KeyboardProc, but that doesn't work. I can't figure out why, because you can disable the action by returning nonzero instead of calling CallNextHookEx.
0
Comment
Question by:mfc022197
[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
3 Comments
 
LVL 23

Accepted Solution

by:
chensu earned 130 total points
ID: 1300519
You can override CPropertyPage::OnOK().

0
 

Author Comment

by:mfc022197
ID: 1300520
But at that time it's too late to inhibit the action or change the keyboard code.

/Arne
0
 
LVL 23

Expert Comment

by:chensu
ID: 1300521
I mean you don't need to change the keyboard code. In your own CPropertyPage::OnOK(), you can call CPropertyPage::NextDlgCtrl() to simulate the TAB action (CPropertyPage is derived from CDialog, so the member function NextDlgCtrl() is also the member function of CPropertyPage).

0

Featured Post

Free Tool: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Looking for a specific application/software 2 119
Detect CR LF to each line 12 176
isEverywhere  challenge 19 86
sumHeights  challenge 17 80
Introduction: Dialogs (1) modal - maintaining the database. Continuing from the ninth article about sudoku.   You might have heard of modal and modeless dialogs.  Here with this Sudoku application will we use one of each type: a modal dialog …
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.

730 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