CXTPPropertyPage does not work with OnCmdMsg |
Post Reply |
Author | |
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
Posted: 27 June 2009 at 12:16pm |
I have some panes derived from CXTPPropertyPane. This gives me good scrollbar behavior thanks to the special member variables m_TotalDev etc. Though, I discovered a problem; my command-handlers stopped working when I switched from CXTPDialog to CXTPPropertyPage.
// My custom command router stopped working:
if (pPane->OnCmdMsg(...))
return TRUE;
How do I make my commands work inside a CXTPPropertyPane? If it's not possible, then how do I get the scrollbar behavior in CXTPDialog?
|
|
PokerMemento - http://www.pokermemento.com/
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, it have to - CProperypage derived from CDialog. Check in MFC sources what methods can prevent it.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
My pane derives from CPaneBase, which is derived from CXTPPropertyPage. When I press <enter> in my edit-box, nothing happens.
If I change the base-class of CPaneBase to CXTPDialog, <enter> triggers OnOK.
Hence, the problem must be in CXTPPropertyPage!
Note:
I did find a similar problem on the net, regarding CPropertyPage. I was hoping you knew what was going on. Anyway, if MFC does something nasty with property pages, then I must use CXTPDialog instead. It would be great to have scrollbar-functionality, but it seems it's only implemented in CXTPPropertyPage . Any hints?
|
|
PokerMemento - http://www.pokermemento.com/
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Could this be it? BOOL CPropertyPage::PreTranslateMessage(MSG* pMsg){ VERIFY(!CWnd::PreTranslateMessage(pMsg)); return FALSE; // handled by CPropertySheet::PreTranslateMessage} |
|
PokerMemento - http://www.pokermemento.com/
|
|
Oleg
Admin Group Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
|
Hi, I need more details about what you have, where/what you call to give some hint. ideally if you update propertysheet sample and attach it here.
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
I was right. Copying CDialog::PreTranslateMessage and overriding it in my CPropertyPage-based class solved it:
BOOL CDialogPaneBase::PreTranslateMessage(MSG* pMsg)
{ // CPropertyPage does not handle messages the way we want, but CDialog does. return CDialog::PreTranslateMessage(pMsg); } I believe CPropertyPage is not meant to be used as a pane window :P. Thanks for your assistance though.
|
|
PokerMemento - http://www.pokermemento.com/
|
|
ABuenger
Newbie Joined: 02 February 2006 Status: Offline Points: 1075 |
Post Options
Thanks(0)
|
What you want is a tabbed view. See the sample. |
|
Codejock support
|
|
znakeeye
Senior Member Joined: 26 July 2006 Status: Offline Points: 1672 |
Post Options
Thanks(0)
|
Nah, I want to put a dialog/form inside a pane. This is no big deal, but if you want scrollbars for the dialog, then CXTPPropertyPage is the way to go. Though, for correct keyboard handling, the hack above is needed!
|
|
PokerMemento - http://www.pokermemento.com/
|
|
Post Reply | |
Tweet
|
Forum Jump | Forum Permissions You cannot post new topics in this forum You cannot reply to topics in this forum You cannot delete your posts in this forum You cannot edit your posts in this forum You cannot create polls in this forum You cannot vote in polls in this forum |