Powered by Invision Power Board

Welcome Guest ( Log In | Register )

 
Reply to this topicStart new topicStart Poll

Outline · [ Standard ] · Linear+

> CPreferencesDlg::PreTranslateMessage, Use VK_TAB, VK_PRIOR and VK_NEXT keys

gonzlogu
Aug 8 2005, 15:24
+Quote Post





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);
}
User is offlineProfile CardPM
Go to the top of the page
Post #1
gonzlogu
Aug 8 2005, 21:46
+Quote Post





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;
User is offlineProfile CardPM
Go to the top of the page
Post #2
Aw3
Aug 8 2005, 23:59
+Quote Post





Group: Admins
Posts: 7319
Joined: 8-December 03



Thank you very much for nice corrections.
Keep on the same way! shades.gif

[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
User is offlineProfile CardPM
Go to the top of the page
Post #3
DoubleT
Aug 10 2005, 13:30
+Quote Post





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.
User is offlineProfile CardPM
Go to the top of the page
Post #4
Aw3
Aug 11 2005, 00:09
+Quote Post





Group: Admins
Posts: 7319
Joined: 8-December 03



Because Ctrl-Tab is your shortcut for window rotation wink.gif.
User is offlineProfile CardPM
Go to the top of the page
Post #5
DoubleT
Aug 11 2005, 14:39
+Quote Post





Group: Developers
Posts: 1076
Joined: 21-January 03
From: Germany



Yeah, true! w00t.gif
The concept isn't very consistent ...
User is offlineProfile CardPM
Go to the top of the page
Post #6
WiZaRd
Aug 14 2005, 13:43
+Quote Post





Group: Members
Posts: 39
Joined: 25-July 05



Using a YesNo AfxMsgBox should display the current systems language strings, no?
User is offlineProfile CardPM
Go to the top of the page
Post #7
Aw3
Aug 14 2005, 14:53
+Quote Post





Group: Admins
Posts: 7319
Joined: 8-December 03



Yes.
User is offlineProfile CardPM
Go to the top of the page
Post #8
Fuxie - DK
Aug 14 2005, 18:00
+Quote Post





Group: Managers
Posts: 4800
Joined: 21-January 03
From: Copenhagen, Denmark



QUOTE(WiZaRd @ Aug 14 2005, 15:43)
Using a YesNo AfxMsgBox should display the current systems language strings, no?
*



QUOTE(Aw3 @ Aug 14 2005, 16:53)
Yes.
*

But not all people use the same language in Windows as in eMule Plus w00t.gif
User is offlineProfile CardPM
Go to the top of the page
Post #9
Aw3
Aug 14 2005, 19:46
+Quote Post





Group: Admins
Posts: 7319
Joined: 8-December 03



Please read my first reply.
User is offlineProfile CardPM
Go to the top of the page
Post #10
Fuxie - DK
Aug 15 2005, 15:21
+Quote Post





Group: Managers
Posts: 4800
Joined: 21-January 03
From: Copenhagen, Denmark



QUOTE(Aw3 @ Aug 14 2005, 21:46)
Please read my first reply.
*

DOH! scared.gif wallbash.gif wallbash.gif wallbash.gif ouch.gif
User is offlineProfile CardPM
Go to the top of the page
Post #11

Reply to this topicTopic OptionsStart new topic
 

Lo-Fi Version Time is now: 22nd May 2013 - 14:12