조회 수 42362 댓글 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
번호 분류 제목 날짜 조회 수 추천 수
71 C# C# 시스템 정보 가져오기 2013.01.18 22263 0
70 C# C# 배열 array 2014.10.22 12657 0
69 C# C# 문자열 숫자형식 포맷팅 String.Format ( C# Numberic Formatting ) 2012.10.10 59542 0
68 C# C# 레지스트리 사용하기 2010.03.15 40632 0
67 C# c# 다국어 개발 2012.05.22 18250 0
66 C# C# XML Documentation - C# 소스코드 문서화 [출처] C# XML Documentation - C# 소스코드 문서화 2013.10.01 14723 0
65 C# C# JSON 파싱(parsing): Newtonsoft 및 System.Text.Json 2021.05.15 11166 0
64 C# c# file i/o 샘플 2012.01.04 17080 0
63 C# C# Color Table 2012.12.04 18883 0
62 C# C# ?? 및 ??=, ?. 연산자 2021.05.09 3286 0
61 C# byte[] <-> string 변환 방법 2013.01.16 41143 0
60 일반 BT와 BLE 2017.05.16 6814 0
59 LINUX bluetooth on Ubuntu 2017.05.25 13697 0
58 일반 Beyond Compare로 patch 파일 만들기, 적용하기 file 2012.10.22 16495 0
57 C# Best way to implement keyboard shortcuts in a Windows Forms application 2015.11.06 6854 0
목록
Board Pagination ‹ Prev 1 ... 25 26 27 28 29 30 31 32 33 34 Next ›
/ 34

나눔글꼴 설치 안내


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

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

설치 취소

Designed by sketchbooks.co.kr / sketchbook5 board skin

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5

Sketchbook5, 스케치북5