조회 수 42299 댓글 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 일반 [VB] 파생된 수학 삼각 함수 2005.08.05 37222 0
490 Android Fastboot (Android Image 적용) 사용하기 2012.02.15 22115 0
489 C 개선된 Trim() - trim(), trim_right(), trim_left() 2005.08.05 31267 0
488 일반 감마 함수 - Gamma_F() file 2005.08.05 33967 0
487 일반 적분 해주는 함수 예제 file 2005.08.05 41558 0
486 일반 탐색기 오른쪽 팝업메뉴에 항목 추가하기 2005.08.05 42141 0
485 C Linked List 예제 (단순 연결 리스트) file 2005.08.10 54158 0
484 C Linked List 예제 (요셉의 문제 - 환형 연결 리스트) file 2005.08.10 39399 0
483 C Linked List 예제 (이중 연결 리스트) file 2005.08.10 46418 0
482 C Stack 스택 (배열로 구현) file 2005.08.10 41547 0
481 C Stack 스택 (Linked List로 구현) file 2005.08.10 37642 0
480 C Queue 큐 (배열로 구현) file 2005.08.10 42113 0
479 C Queue 큐 (Linked List로 구현) file 2005.08.10 42225 0
478 C 선택정렬 Selection Sort file 2005.08.10 34347 0
477 C 삽입정렬 Insertion Sort file 2005.08.10 33059 0
목록
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