Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Command Bars
  New Posts New Posts RSS Feed - Derived control doesn't work in collapsed group
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

Derived control doesn't work in collapsed group

 Post Reply Post Reply
Author
Message
DavidH View Drop Down
Groupie
Groupie


Joined: 24 March 2007
Status: Offline
Points: 60
Post Options Post Options   Thanks (0) Thanks(0)   Quote DavidH Quote  Post ReplyReply Direct Link To This Post Topic: Derived control doesn't work in collapsed group
    Posted: 15 January 2010 at 8:00am
To suit my needs for a control on the Ribbon, I derived a new class from it:

class ValueEditRibbon: public CXTPControlEdit{
public:
...
protected:
  BOOL OnHookKeyDown(UINT nChar, LPARAM lParam);
private:
...
};

I use the OnHookKeyDown to make sure only certain patterns can be entered (numerical values with fractions).

I put it on the ribbon like this:
ValueEditRibbon* veValue(new ValueEditRibbon());
pGroup->Add(veValue, ID_EDITABLE_VALUE);

This all works fine.

When I make the application screen small, the group with this control collapses. This is intended behavior of course.
However, when I click the arrow down to unfold it, the edit box is there, but its OnHookKeyDown is no longer called. The control seems to be cast down to a CControlEditRibbon.



What can I do to make it work?

Thanks,

David.
Back to Top
 Post Reply Post Reply
  Share Topic   

Forum Jump Forum Permissions View Drop Down

Forum Software by Web Wiz Forums® version 12.04
Copyright ©2001-2021 Web Wiz Ltd.

This page was generated in 0.049 seconds.