![]() |
mnemonics not work in tab control page |
Post Reply
|
| Author | |
joggx
Groupie
Joined: 21 August 2007 Status: Offline Points: 42 |
Post Options
Thanks(0)
Quote Reply
Topic: mnemonics not work in tab control pagePosted: 13 December 2007 at 1:37pm |
|
I use CXTPTabControl on a formview then the page's mnemonics do not work any more. Also the tab key doesn't work either.
How can it make it work like in a normal dialog? Many thanks Timmy |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 December 2007 at 2:50pm |
|
Think you can catch PreTranslateMessage and manually set page. form our code:
BOOL CXTPCustomizeSheet::PreTranslateMessage(MSG* pMsg)
{ if (pMsg->message == WM_SYSKEYDOWN) { CTabCtrl* pTabCtrl = GetTabControl(); if (pTabCtrl) { for (int i = 0; i < pTabCtrl->GetItemCount(); i++) { TCHAR lpCaption[256]; lpCaption[0] = _T('\0'); TCITEM tcItem; tcItem.mask = TCIF_TEXT; tcItem.pszText = lpCaption; tcItem.cchTextMax = 256; if (pTabCtrl->GetItem(i, &tcItem))
{ TCHAR* pAmp = _tcsrchr(lpCaption, _T('&')); if (pAmp) { if (CXTPShortcutManager::CompareAccelKey(*(pAmp + 1), (TCHAR)pMsg->wParam)) { SetActivePage(i); return TRUE; } }
} } }
} return CPropertySheet::PreTranslateMessage(pMsg); } |
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
joggx
Groupie
Joined: 21 August 2007 Status: Offline Points: 42 |
Post Options
Thanks(0)
Quote Reply
Posted: 14 December 2007 at 11:32pm |
|
Thanks. But my problem is the ampersands inside the property pages are not working. Here is the hierarchy of UI classes:
CPropertyPage -> CXTPTabControl -> CXTResizeFormView Plus the tab key, which is used to navigate through the controls in a page, becomes unusable. The Ctrl+Tab is unable to switch between different property pages too. Thanks. |
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 December 2007 at 12:12pm |
|
You use TabControl instead of Tabs for PropertyPages???
Try our CXTPPropertySheet from last releases.
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
joggx
Groupie
Joined: 21 August 2007 Status: Offline Points: 42 |
Post Options
Thanks(0)
Quote Reply
Posted: 15 December 2007 at 2:12pm |
|
we need to add our own buttons at the bottom, can CXTPPropertySheet do that?
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 16 December 2007 at 11:53am |
|
Yes, in OnCreate call AddButton(nIDCaption, nID)
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
joggx
Groupie
Joined: 21 August 2007 Status: Offline Points: 42 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 December 2007 at 2:27pm |
|
Is there any sample code demonstrating the CXTPPropertySheet in codejock?
|
|
![]() |
|
Oleg
Senior Member
Joined: 21 May 2003 Location: United States Status: Offline Points: 11234 |
Post Options
Thanks(0)
Quote Reply
Posted: 18 December 2007 at 3:36pm |
|
Samples\Controls\PropertySheet
|
|
|
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS |
|
![]() |
|
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 |