PreTranslateMessage()에서
if(GetKeyState(VK_SHIFT)<0)//시프트 키 눌렀을 때의 후킹 메세지
{
switch (pMsg->message)
{
case WM_KEYDOWN:
switch (pMsg->wParam)
{
case VK_TAB:
if(pMsg->hwnd == GetDlgItem(IDU_GROUP_SENDSMS_EDIT )->m_hWnd) m_groupRecvNumEdit .SetFocus();
else if(pMsg->hwnd == GetDlgItem(IDU_GROUP_SENDNUM_EDIT )->m_hWnd) m_groupSendSmsEdit .SetFocus();
else if(pMsg->hwnd == GetDlgItem(IDU_GROUP_FIND_EDIT )->m_hWnd) m_groupSendNumEdit .SetFocus();
else if(pMsg->hwnd == GetDlgItem(IDU_GROUP_RECVNAME_EDIT)->m_hWnd) m_groupFindEdit .SetFocus();
else if(pMsg->hwnd == GetDlgItem(IDU_GROUP_RECVNUM_EDIT )->m_hWnd) m_groupRecvNameEdit .SetFocus();
return TRUE;
}
break;
}
}
else
{
switch (pMsg->message)
{
case WM_KEYDOWN:
switch (pMsg->wParam)
{
case VK_UP:
case VK_DOWN:
case VK_LEFT:
case VK_RIGHT:
case VK_HOME:
case VK_END:
::SendMessage( pMsg->hwnd , pMsg->message, pMsg->wParam, pMsg->lParam);
return TRUE;
case VK_TAB:
if(pMsg->hwnd == GetDlgItem(IDU_GROUP_SENDSMS_EDIT )->m_hWnd) m_groupSendNumEdit .SetFocus();
else if(pMsg->hwnd == GetDlgItem(IDU_GROUP_SENDNUM_EDIT )->m_hWnd) m_groupFindEdit .SetFocus();
else if(pMsg->hwnd == GetDlgItem(IDU_GROUP_FIND_EDIT )->m_hWnd) m_groupRecvNameEdit .SetFocus();
else if(pMsg->hwnd == GetDlgItem(IDU_GROUP_RECVNAME_EDIT)->m_hWnd) m_groupRecvNumEdit .SetFocus();
else if(pMsg->hwnd == GetDlgItem(IDU_GROUP_RECVNUM_EDIT )->m_hWnd) m_groupSendSmsEdit .SetFocus();
return TRUE;
}
break;
}
}
return COleControl::PreTranslateMessage(pMsg);
'Programming > ActiveX' 카테고리의 다른 글
[ActiveX] Java Script 함수 호출하기 (0) | 2007.08.01 |
---|---|
[ActiveX] 이벤트 추가하기 (0) | 2007.08.01 |
[ActiveX] (0) | 2007.08.01 |
[ActiveX] 버튼클릭 할 때 모달리스 중복 생성되지 않게.. (0) | 2007.08.01 |
[ActiveX] 테트리스 제작을 포함한 ActiveX 배우기 (0) | 2007.08.01 |