CPreferencesDlg::PreTranslateMessage, Use VK_TAB, VK_PRIOR and VK_NEXT keys
|
|
![]() ![]() ![]() |
CPreferencesDlg::PreTranslateMessage, Use VK_TAB, VK_PRIOR and VK_NEXT keys
| gonzlogu |
Aug 8 2005, 15:24
|
|
Group: Members Posts: 2 Joined: 8-August 05 |
This solves the problem when using Ctrl+TAB to change to another Preferences Page.
BOOL CPreferencesDlg::PreTranslateMessage (MSG* pMsg) { // allow sheet to translate Ctrl+Tab, Shift+Ctrl+Tab, // Ctrl+PageUp, and Ctrl+PageDown if (pMsg->message == WM_KEYUP && GetPageCount() > 1 && GetAsyncKeyState(VK_CONTROL) < 0 && (pMsg->wParam == VK_TAB || pMsg->wParam == VK_PRIOR || pMsg->wParam == VK_NEXT)) { m_dwActiveWnd = GetActiveIndex(); m_slideBar.SelectGlobalItem(m_dwActiveWnd); OnSlideBarSelChanged(NULL, NULL); } return CPropertySheet::PreTranslateMessage (pMsg); } |
|
Post
#1
|
|
| gonzlogu |
Aug 8 2005, 21:46
|
|
Group: Members Posts: 2 Joined: 8-August 05 |
Translating Yes/No in Exit Dialog:
CString strExit, strWPPName; strExit = GetResString (IDS_MSGGRAL_648); // Do you want to exit the program? strWPPName.LoadString (AFX_IDS_APP_TITLE); // bExit = AfxMessageBox (strExit, MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2); CdMessageBox* box = new CdMessageBox (this, strExit, "", strWPPName, MB_YESNO | MB_ICONQUESTION | MB_DEFBUTTON2); box->SetCaptions(IDYES, GetResString (IDS_YES)); // Yes box->SetCaptions(IDNO, GetResString (IDS_NO)); // No // box->SetMsgIcon(::LoadIcon(AfxGetInstanceHandle(), MAKEINTRESOURCE(IDR_MAINFRAME))); bExit = box->MsgBoxEx(); delete box; |
|
Post
#2
|
|
| Aw3 |
Aug 8 2005, 23:59
|
|
Group: Admins Posts: 7319 Joined: 8-December 03 |
Thank you very much for nice corrections.
Keep on the same way! [EDIT] It's too much overhead to localize Yes/No. If your system is, let's say, in English, but current eMule+ language is different, I guess, everyone will understand Yes/No in English anyway. This post has been edited by Aw3: Aug 9 2005, 00:58 |
|
Post
#3
|
|
| DoubleT |
Aug 10 2005, 13:30
|
|
Group: Developers Posts: 1076 Joined: 21-January 03 From: Germany |
Strange, after merging CPreferencesDlg::PreTranslateMessage() from CVS i have such problem:
CTRL & Tab: rotates the main window (server, download, search, sharing, ...) CTRL+Shift & Tab: rotates the preferences backwards, how it should. |
|
Post
#4
|
|
| Aw3 |
Aug 11 2005, 00:09
|
|
Group: Admins Posts: 7319 Joined: 8-December 03 |
Because Ctrl-Tab is your shortcut for window rotation
|
|
Post
#5
|
|
| DoubleT |
Aug 11 2005, 14:39
|
|
Group: Developers Posts: 1076 Joined: 21-January 03 From: Germany |
Yeah, true!
The concept isn't very consistent ... |
|
Post
#6
|
|
| WiZaRd |
Aug 14 2005, 13:43
|
|
Group: Members Posts: 39 Joined: 25-July 05 |
Using a YesNo AfxMsgBox should display the current systems language strings, no?
|
|
Post
#7
|
|
| Aw3 |
Aug 14 2005, 14:53
|
|
Group: Admins Posts: 7319 Joined: 8-December 03 |
Yes.
|
|
Post
#8
|
|
| Fuxie - DK |
Aug 14 2005, 18:00
|
|
Group: Managers Posts: 4800 Joined: 21-January 03 From: Copenhagen, Denmark |
|
|
Post
#9
|
|
| Aw3 |
Aug 14 2005, 19:46
|
|
Group: Admins Posts: 7319 Joined: 8-December 03 |
Please read my first reply.
|
|
Post
#10
|
|
| Fuxie - DK |
Aug 15 2005, 15:21
|
|
Group: Managers Posts: 4800 Joined: 21-January 03 From: Copenhagen, Denmark |
|
|
Post
#11
|
|
![]() ![]() ![]() |
| Lo-Fi Version | Time is now: 22nd May 2013 - 14:12 |