diff --git a/dialogs/world_prefs/TimerDlg.cpp b/dialogs/world_prefs/TimerDlg.cpp index b4833ab5..8212ff27 100644 --- a/dialogs/world_prefs/TimerDlg.cpp +++ b/dialogs/world_prefs/TimerDlg.cpp @@ -404,3 +404,16 @@ CEditMultiLine dlg; } + +// Alt+Return edits "send" text +BOOL CTimerDlg::PreTranslateMessage(MSG* pMsg) +{ + if (pMsg->message == WM_SYSKEYDOWN && + pMsg->wParam == VK_RETURN) + { + PostMessage(WM_COMMAND, MAKELONG(IDC_EDIT_SEND, BN_CLICKED), NULL); + return FALSE; + } + + return CDialog::PreTranslateMessage(pMsg); +} diff --git a/dialogs/world_prefs/TimerDlg.h b/dialogs/world_prefs/TimerDlg.h index fc1818e4..912532a4 100644 --- a/dialogs/world_prefs/TimerDlg.h +++ b/dialogs/world_prefs/TimerDlg.h @@ -58,6 +58,8 @@ class CTimerDlg : public CDialog // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CTimerDlg) + public: + virtual BOOL PreTranslateMessage(MSG* pMsg); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL diff --git a/dialogs/world_prefs/aliasdlg.cpp b/dialogs/world_prefs/aliasdlg.cpp index 379a6b57..2b958005 100644 --- a/dialogs/world_prefs/aliasdlg.cpp +++ b/dialogs/world_prefs/aliasdlg.cpp @@ -535,3 +535,16 @@ CEditMultiLine dlg; } + +// Alt+Return edits "send" text +BOOL CAliasDlg::PreTranslateMessage(MSG* pMsg) +{ + if (pMsg->message == WM_SYSKEYDOWN && + pMsg->wParam == VK_RETURN) + { + PostMessage(WM_COMMAND, MAKELONG(IDC_EDIT_SEND, BN_CLICKED), NULL); + return FALSE; + } + + return CDialog::PreTranslateMessage(pMsg); +} diff --git a/dialogs/world_prefs/aliasdlg.h b/dialogs/world_prefs/aliasdlg.h index cc66ffd9..be9f5f22 100644 --- a/dialogs/world_prefs/aliasdlg.h +++ b/dialogs/world_prefs/aliasdlg.h @@ -56,6 +56,8 @@ class CAliasDlg : public CDialog // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CAliasDlg) + public: + virtual BOOL PreTranslateMessage(MSG* pMsg); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL diff --git a/dialogs/world_prefs/triggdlg.cpp b/dialogs/world_prefs/triggdlg.cpp index 93047744..ca428561 100644 --- a/dialogs/world_prefs/triggdlg.cpp +++ b/dialogs/world_prefs/triggdlg.cpp @@ -823,3 +823,16 @@ if (GetText (m_ctlLinesToMatch) == "0") m_ctlLinesToMatch.SetWindowText ("2"); } + +// Alt+Return edits "send" text +BOOL CTriggerDlg::PreTranslateMessage(MSG* pMsg) +{ + if (pMsg->message == WM_SYSKEYDOWN && + pMsg->wParam == VK_RETURN) + { + PostMessage(WM_COMMAND, MAKELONG(IDC_EDIT_SEND, BN_CLICKED), NULL); + return FALSE; + } + + return CDialog::PreTranslateMessage(pMsg); +} diff --git a/dialogs/world_prefs/triggdlg.h b/dialogs/world_prefs/triggdlg.h index 5f7c98a7..7b39f933 100644 --- a/dialogs/world_prefs/triggdlg.h +++ b/dialogs/world_prefs/triggdlg.h @@ -97,6 +97,8 @@ class CTriggerDlg : public CDialog // Overrides // ClassWizard generated virtual function overrides //{{AFX_VIRTUAL(CTriggerDlg) + public: + virtual BOOL PreTranslateMessage(MSG* pMsg); protected: virtual void DoDataExchange(CDataExchange* pDX); // DDX/DDV support //}}AFX_VIRTUAL