조회 수 42301 댓글 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의 코드 스크랩

내가 모으고 내가 보는

List of Articles
번호 분류 제목 날짜 조회 수 추천 수
491 C Queue 큐 (Linked List로 구현) file 2005.08.10 42226 0
490 C 선택정렬 Selection Sort file 2005.08.10 34348 0
489 C 삽입정렬 Insertion Sort file 2005.08.10 33060 0
488 C 거품정렬 Bubble Sort file 2005.08.10 32806 0
487 C 쉘 정렬 Shell Sort file 2005.08.10 33351 0
486 C 퀵 정렬 Quick Sort file 2005.08.10 38877 0
485 C 힙 정렬 Heap Sort file 2005.08.10 38428 0
484 C 병합 정렬 Merge Sort file 2005.08.10 35320 0
483 일반 cmd.exe 명령 도움말 2005.08.31 32073 0
482 C 64bit DES 암복호화 코드 1 file 2005.09.22 33397 0
481 C Base64 로 encoding / decoding 하는 예제 file 2005.09.22 26014 0
480 MFC MFC에서 인자(argument)처리 2005.10.28 47204 0
479 일반 아스키 코드표 file 2006.01.04 43619 0
478 LINUX Unix Find 명령 기본 사용법 2006.02.02 49956 16
477 LINUX |(파이프), grep 명령어에 대해서 2006.02.06 32696 17
목록
Board Pagination ‹ Prev 1 2 3 4 5 6 7 8 9 10 ... 34 Next ›
/ 34

나눔글꼴 설치 안내


이 PC에는 나눔글꼴이 설치되어 있지 않습니다.

이 사이트를 나눔글꼴로 보기 위해서는
나눔글꼴을 설치해야 합니다.

설치 취소

Designed by sketchbooks.co.kr / sketchbook5 board skin

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5