- Problem with property pages and property sheets
- Posted by Nobody You Know on November 15th, 2003
I'm developing an application that, as speced, requires users to be
able to tab from a control on a property page to the OK button on the
property sheet, and from there to tab back to a different control on
that same property page.
I've been all over MSDN looking for a way to do this ... nada. Ditto
for all the MFC books in my library. The cupboard is bare on this one.
Can some MFC guru offer a helpful suggestion? Thanks for your time!
- Posted by Raymond Chen on November 15th, 2003
Um this is all done automatically by the dialog manager if you
use a standard property sheet. The TAB key moves you from one
WS_TABSTOP control to the next, and from the last one back to the
first.
On 15 Nov 2003 05:09:29 -0800, apasserby@hushmail.com (Nobody You
Know) wrote:
- Posted by Nobody You Know on November 16th, 2003
Raymond Chen <http://guest@blogs.gotdotnet.com/raymondc/> wrote in message news:<asncrvoqni06kskme8agbkncl1q0qrm5mr@4ax.com>. ..
Perhaps I wasn't sufficiently precise in specifying the problem. As a
C++ developer I understand how the Windows MFC framework automagically
supports tabbing from one control to the next in the tab order ... but
what I need to do is override that standard behavior by enabling the
tab key when pressed on control A in property page one to set the
focus to control B (the OK button) in the property *sheet*. If the tab
key is pressed in this control, the focus should then be set to
control C back on property page one.
This is not standard behavior and I'm not at all sure how to implement
it -- or even if it can be implemented at all. I would really be
grateful to anyone who can help me out.
- Posted by Tim Robinson on November 16th, 2003
"Nobody You Know" <apasserby@hushmail.com> wrote in message
news:24575a36.0311160910.277fa92e@posting.google.c om...
You mean you want to insert the property *sheet's* OK button into the middle
of the tab order for the property *page*? I've never tried this, but you
could start by handling WM_NEXTDLGCTL: "The WM_NEXTDLGCTL message is sent to
a dialog box procedure to set the keyboard focus to a different control in
the dialog box". DefDlgProc handles this to return the control immediately
before or after the one in wParam, but you could insert some logic to do
special behaviour between controls A, B and C.
--
Tim Robinson (MVP, Windows SDK)
http://www.themobius.co.uk/
- Posted by Raymond Chen on November 16th, 2003
Okay I get it now. You want to rotate the z-order.
http://blogs.gotdotnet.com/raymondc/...7-7e9063ebda9a
in this case you want to rotate it so C is at the top of the
z-order and A is at the bottom; that way OK goes between them.
On 16 Nov 2003 09:10:20 -0800, apasserby@hushmail.com (Nobody You
Know) wrote: