Jump to content
  • Advertisement

Archived

This topic is now archived and is closed to further replies.

Shag

Subclassing edit control problems ...

This topic is 5720 days old which is more than the 365 day threshold we allow for new replies. Please post a new topic.

If you intended to correct an error in the post then please contact us.

Recommended Posts

OK ... I''ve subclassed an edit control to intercept the tab key (to move the focus to another edit control). This works fine apart from one small problem - everytime I hit the tab key the program beeps at me Any ideas what''s going on? Regards

Share this post


Link to post
Share on other sites
Advertisement
Anoter question ...

Do you actually have to subclass to enable the tab key to move the focus from one edit control to another? This implies otherwise ...

QUOTE - MSDN: The user can select an edit control by clicking it with the mouse or by tabbing to it. The "tabbing" method is part of a predefined keyboard interface that the system provides.

Is this crap? I believe that only works when using dialog resources. Can someone confirm that?

Cheers

Share this post


Link to post
Share on other sites
quote:
Original post by Shag
Do you actually have to subclass to enable the tab key to move the focus from one edit control to another? This implies otherwise ...


i would expect that kind of functionality to be available through PreTranslateMessage or its equivalent.

no ideas on your original question, but moving from subclassing to PreTranslateMessage may fix it.

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
you don''t need to subclass to get tab key support. it sounds like you''re creating your control window on the fly, not through a dialog resource? if so, are you setting the WS_TABSTOP style?

Share this post


Link to post
Share on other sites
Guest Anonymous Poster
quote:
Original post by niyaw
i would expect that kind of functionality to be available through PreTranslateMessage or its equivalent.

no ideas on your original question, but moving from subclassing to PreTranslateMessage may fix it.


PreTranslateMessage is MFC-specific and has nothing to do with tab key processing.

tab key processing is handled via the normal dialog box message pump or via explicit IsDialogMessage call.

Share this post


Link to post
Share on other sites

  • Advertisement
×

Important Information

By using GameDev.net, you agree to our community Guidelines, Terms of Use, and Privacy Policy.

We are the game development community.

Whether you are an indie, hobbyist, AAA developer, or just trying to learn, GameDev.net is the place for you to learn, share, and connect with the games industry. Learn more About Us or sign up!

Sign me up!