BOOL CFileManagerDlg::PreTranslateMessage(MSG* pMsg)
{
if( pMsg->hwnd == m_List_Explorer.m_hWnd )
{
if(pMsg->message == WM_KEYDOWN)
{
if(::GetKeyState(VK_CONTROL) < 0 && pMsg->wParam == 'A')
{
for (int i=0; i<m_List_Explorer.GetItemCount(); i++)
m_List_Explorer.SetItemState(i, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED);
{
if( pMsg->hwnd == m_List_Explorer.m_hWnd )
{
if(pMsg->message == WM_KEYDOWN)
{
if(::GetKeyState(VK_CONTROL) < 0 && pMsg->wParam == 'A')
{
for (int i=0; i<m_List_Explorer.GetItemCount(); i++)
m_List_Explorer.SetItemState(i, LVIS_FOCUSED | LVIS_SELECTED, LVIS_FOCUSED | LVIS_SELECTED);
return TRUE;
}
}
}
return CDialog::PreTranslateMessage(pMsg);
}
}
}
}
return CDialog::PreTranslateMessage(pMsg);
}
대략 이런식이다...