OSDN Git Service

Move more code from C104Keyboard and C109Keyboard to CKeyboardLayout,
[xkeymacs/xkeymacs.git] / xkeymacs / 109keyboard.cpp
index 5f0d124..efe940b 100644 (file)
@@ -2,8 +2,6 @@
 //\r
 \r
 #include "stdafx.h"\r
-#include <Lmcons.h>\r
-#include "xkeymacs.h"\r
 #include "109Keyboard.h"\r
 \r
 #ifdef _DEBUG\r
@@ -24,89 +22,6 @@ C109Keyboard::C109Keyboard(const HKEY_TYPE hkey_type, CWnd *const pParent /*=NUL
        //}}AFX_DATA_INIT\r
 }\r
 \r
-void C109Keyboard::DoDataExchange(CDataExchange *const pDX)\r
-{\r
-       CDialog::DoDataExchange(pDX);\r
-       //{{AFX_DATA_MAP(C109Keyboard)\r
-               // NOTE: the ClassWizard will add DDX and DDV calls here\r
-       //}}AFX_DATA_MAP\r
-}\r
-\r
-\r
-BEGIN_MESSAGE_MAP(C109Keyboard, CDialog)\r
-       //{{AFX_MSG_MAP(C109Keyboard)\r
-       ON_WM_DESTROY()\r
-       //}}AFX_MSG_MAP\r
-END_MESSAGE_MAP()\r
-\r
-/////////////////////////////////////////////////////////////////////////////\r
-// C109Keyboard message handlers\r
-\r
-BOOL C109Keyboard::OnInitDialog() \r
-{\r
-       CDialog::OnInitDialog();\r
-       \r
-       CString szWindowText;\r
-       CString szFor;\r
-       switch (m_HkeyType) {\r
-       case CURRENT_USER:\r
-               {\r
-                       TCHAR szUserName[UNLEN + 1] = {'0'};\r
-                       DWORD nSize = UNLEN + 1;\r
-                       if (GetUserName(szUserName, &nSize)) {\r
-                               szFor.Format(IDS_FOR, szUserName);\r
-                       } else {\r
-                               szFor.LoadString(IDS_FOR_LOGGED_ON_USER);\r
-                       }\r
-               }\r
-               break;\r
-       case LOCAL_MACHINE:\r
-               szFor.LoadString(IDS_FOR_ANY_USER);\r
-               break;\r
-       default:\r
-               break;\r
-       }\r
-       this->GetWindowText(szWindowText);\r
-       this->SetWindowText(szWindowText + szFor);\r
-\r
-       m_ToolTip.Create(this, TTS_ALWAYSTIP | TTS_NOPREFIX);\r
-       m_ToolTip.SetMaxTipWidth(0x100);        // Enable multiline\r
-\r
-       InitKeyboardLayout();\r
-\r
-       return TRUE;  // return TRUE unless you set the focus to a control\r
-                     // EXCEPTION: OCX Property Pages should return FALSE\r
-}\r
-\r
-void C109Keyboard::OnOK() \r
-{\r
-       if (LostKeyWarning(m_HkeyType) != IDCANCEL) {\r
-               SaveScanCodeMap(m_HkeyType);\r
-\r
-               CDialog::OnOK();\r
-       }\r
-}\r
-\r
-void C109Keyboard::OnDestroy() \r
-{\r
-       CDialog::OnDestroy();\r
-\r
-       DestroyKeyboardLayout();\r
-}\r
-\r
-BOOL C109Keyboard::PreTranslateMessage(MSG *const pMsg) \r
-{\r
-       switch (pMsg->message) {\r
-       case WM_LBUTTONDOWN:\r
-       case WM_LBUTTONUP:\r
-       case WM_MOUSEMOVE:\r
-               m_ToolTip.RelayEvent(pMsg);\r
-               break;\r
-       }\r
-\r
-       return CDialog::PreTranslateMessage(pMsg);\r
-}\r
-\r
 int C109Keyboard::GetToolTipID(int nToolTipID)\r
 {\r
        switch (nToolTipID) {\r