Using shortcut keys in property pages containg property pages

 Download Source Code and Example


Accessing a sub page within a property page with shortcut keys needs special treatment. I used Zafirs source from his article Using shortcut keys in property pages as a starting point. To make sure that a key stroke reaches any of the sub pages I am checking the key in the PreTranslateMessage of the Dialog first. If the key is not one of the upper pages I am sending the message to the sheet of the sub pages. If the key is not found it is finally swollen by the IsDialogMessage function.

If a subpage has the focus and an ALT + key combination is pressed and the key belongs to an upper page the sub page has to make sure that the key is send back by calling:

return(GetParent()->GetParent()->PreTranslateMessage(pMsg));

This expression assures that always another sheet or the dialog is reached. To directly change the main page from a sub page (e.g. switching from subpage 2 of page 1 to page 2) the key passes the PreTranslateMessage of the sub page is then passed to the PreTranslateMessage of the page, which contains the sub page, who finally sends it to the PreTranslateMessage function of the Dialog where it is translated ! uff.. ;-)

The code is not perfect but you will get my drift..

Last updated: 09/13/98



Comments

  • excellent example!!!!!

    Posted by Legacy on 06/09/1999 12:00am

    Originally posted by: Joe Dobbs

    I started w/a new company last week, and my first project involved a PropertSheet w/in another PropertySheet. Needless to say I don't have enough thanks for your excellent example. Good job man!!!

    Joseph Dobbs

    Reply
Leave a Comment
  • Your email address will not be published. All fields are required.

Top White Papers and Webcasts

  • Live Event Date: December 11, 2014 @ 1:00 p.m. ET / 10:00 a.m. PT Market pressures to move more quickly and develop innovative applications are forcing organizations to rethink how they develop and release applications. The combination of public clouds and physical back-end infrastructures are a means to get applications out faster. However, these hybrid solutions complicate DevOps adoption, with application delivery pipelines that span across complex hybrid cloud and non-cloud environments. Check out this …

  • With the average hard drive now averaging one terabyte in size, the fallout from the explosion of user-created data has become an overwhelming volume of potential evidence that law-enforcement and corporate investigators spend countless hours examining. Join Us and SANS' Rob Lee for our 45-minute webinar, A Triage and Collection Strategy for Time-Sensitive Investigations, will demonstrate how to: Identify the folders and files that often contain key insights Reduce the time spent sifting through content by …

Most Popular Programming Stories

More for Developers

RSS Feeds