Codejock Forums Homepage
Forum Home Forum Home > Codejock Products > Visual C++ MFC > Toolkit Pro
  New Posts New Posts RSS Feed - mnemonics not work in tab control page
  FAQ FAQ  Forum Search   Events   Register Register  Login Login

mnemonics not work in tab control page

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


Joined: 21 August 2007
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote joggx Quote  Post ReplyReply Direct Link To This Post Topic: mnemonics not work in tab control page
    Posted: 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
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
joggx View Drop Down
Groupie
Groupie


Joined: 21 August 2007
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote joggx Quote  Post ReplyReply Direct Link To This Post 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.


Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post 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
Back to Top
joggx View Drop Down
Groupie
Groupie


Joined: 21 August 2007
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote joggx Quote  Post ReplyReply Direct Link To This Post Posted: 15 December 2007 at 2:12pm
we need to add our own buttons at the bottom, can CXTPPropertySheet do that? 
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 16 December 2007 at 11:53am
Yes, in OnCreate call AddButton(nIDCaption, nID)
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
Back to Top
joggx View Drop Down
Groupie
Groupie


Joined: 21 August 2007
Status: Offline
Points: 42
Post Options Post Options   Thanks (0) Thanks(0)   Quote joggx Quote  Post ReplyReply Direct Link To This Post Posted: 18 December 2007 at 2:27pm
Is there any sample code demonstrating the CXTPPropertySheet in codejock?
Back to Top
Oleg View Drop Down
Senior Member
Senior Member


Joined: 21 May 2003
Location: United States
Status: Offline
Points: 11234
Post Options Post Options   Thanks (0) Thanks(0)   Quote Oleg Quote  Post ReplyReply Direct Link To This Post Posted: 18 December 2007 at 3:36pm
Samples\Controls\PropertySheet
Oleg, Support Team
CODEJOCK SOFTWARE SOLUTIONS
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.047 seconds.