조회 수 46889 댓글 0
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print
?

단축키

Prev이전 문서

Next다음 문서

+ - Up Down Comment Print

1. PreTranslateMessage(MSG* pMsg)  에서 추가

if (pMsg->message == WM_KEYDOWN &&
    (pMsg->wParam == VK_ESCAPE || pMsg->wParam == VK_CANCEL || pMsg->wParam == VK_RETURN) )
{
    if (pMsg->wParam == VK_RETURN)
    {
        ProcessReturn();
    }
    return TRUE;
}

2. ProcessReturn 함수 구현

/* 오와아아.. 다이얼로그에서 엔터키 한번 처리하기 힘들다 힘들어... 어휴.. */ // Jo UngJe, 2006-4-14
void CUnicode2MBCS_Rus_winDlg::ProcessReturn()
{
    UpdateData(TRUE);

    CWnd *w;
    w = GetFocus();
    
    if (w->GetDlgCtrlID() == IDC_EDIT_HEX)
    {
        int s, e;
        m_EditHex.GetSel(s, e);
        
        m_HexString.Insert(s, '\n');
        m_HexString.Insert(s, '\r');

        UpdateData(FALSE);

        m_EditUni.SetSel(s+2, s+2);
        m_EditHex.SetFocus();
    }
    else if (w->GetDlgCtrlID() == IDC_EDIT_UNI)
    {
        int s, e;
        m_EditUni.GetSel(s, e);
        
        m_UniString.Insert(s, '\n');
        m_UniString.Insert(s, '\r');

        UpdateData(FALSE);

        m_EditUni.SetSel(s+2, s+2);
        m_EditUni.SetFocus();
    }
}

Dreamy의 코드 스크랩

내가 모으고 내가 보는

등록된 글이 없습니다.

목록
Board Pagination ‹ Prev 1
Fatal error: Call to a member function on a non-object in /home1/dndnd222/public_html/zbxe/files/cache/template_compiled/14735e8d269dc2da6984201ac0c65d74.compiled.php on line 204