?
Solved

How to change the default Ok behavior in a propertysheet

Posted on 1997-02-21
3
Medium Priority
?
236 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 390 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

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

Introduction: Displaying information on the statusbar.   Continuing from the third article about sudoku.   Open the project in visual studio. Status bar – let’s display the timestamp there.  We need to get the timestamp from the document s…
In this post we will learn different types of Android Layout and some basics of an Android App.
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.
Add bar graphs to Access queries using Unicode block characters. Graphs appear on every record in the color you want. Give life to numbers. Hopes this gives you ideas on visualizing your data in new ways ~ Create a calculated field in a query: …

741 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