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