![]() |
CXTPTabControl ALT + prefix |
Post Reply ![]() |
Author | |
sbinder ![]() Groupie ![]() ![]() Joined: 22 November 2004 Location: Austria Status: Offline Points: 76 |
![]() ![]() ![]() ![]() ![]() Posted: 13 March 2009 at 7:34am |
I am using CXTPTabControl and I want to use hotkeys with ALT + prefix. I set the members
tabControl.GetPaintManager()->m_bDrawTextNoPrefix = FALSE;
tabControl.GetPaintManager()->m_bDrawTextHidePrefix = FALSE;
and I gave the Control the Style WS_EX_CONTROLPARENT.
When I type for example ALT+S for "System"-Tab nothing happens, but when the Tab is already selected
the CXTPPropertyGrid - which is bind to the TAB - is focused.
And is it possible to use Control + TAB to switch the TABS like in CTabCtrl or CXTTabCtrl? |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
I suppose you need to make your own OnCmdMsg()-handler.
CMainFrame::OnCmdMsg(...)
{
if (m_tabControl.GetSafeHwnd())
{
if (m_tabControl.OnCmdMsg(...))
return TRUE;
}
return CFrameWnd::OnCmdMsg(...);
}
Something like that is needed to get ALT-shortcuts working in your panes/tabs etc.
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
|
sbinder ![]() Groupie ![]() ![]() Joined: 22 November 2004 Location: Austria Status: Offline Points: 76 |
![]() ![]() ![]() ![]() ![]() |
Hallo!
Thanks for the quick reply. I did what you told my in my modal dialog, but it doesn't work.
![]() |
|
![]() |
|
znakeeye ![]() Senior Member ![]() ![]() Joined: 26 July 2006 Status: Offline Points: 1672 |
![]() ![]() ![]() ![]() ![]() |
Not sure how dialogs do this, but you could try something like this...
CYourDlg::OnCmdMsg(...)
{
if (::GetFocus() == m_tabControl.GetSafeHwnd())
{
if (m_tabControl.OnCmdMsg(...))
return TRUE;
}
return CDialog::OnCmdMsg(...);
}
Also, read about IsDialogMessage(). That's the function responsible for ALT-translations.
|
|
PokerMemento - http://www.pokermemento.com/
|
|
![]() |
|
sbinder ![]() Groupie ![]() ![]() Joined: 22 November 2004 Location: Austria Status: Offline Points: 76 |
![]() ![]() ![]() ![]() ![]() |
If I type ALT + prefix from the TabControl (for Example ALT + S for TAB"System") the OnCmdMsg will not be called! If I type ALT + A for my Button (outside the TabControl - in my CDialog) "Abbruch" OnCmdMsg will be called
and the CDialog close as it have to do.
|
|
![]() |
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 |