VK_DELETE is not working for child window
-
in my listview application i have put VK_DELETE. but its now working. child window method is below:
LRESULT CALLBACK GlobaListProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { ..... ..... ..... case WM_KEYDOWN: switch (wParam) { case VK_DELETE: int iSlected=0; iSlected=SendMessage(hList,LVM_GETNEXTITEM,-1,LVNI_FOCUSED); if(iSlected==-1) { MessageBox(hDlg,_T("No Items in ListView"),_T"Error"),MB_OK|MB_ICONINFORMATION); break; } SendMessage(hList,LVM_DELETEITEM,0,0); break ; } ..... ...... .... }
Amit -
in my listview application i have put VK_DELETE. but its now working. child window method is below:
LRESULT CALLBACK GlobaListProc(HWND hDlg, UINT message, WPARAM wParam, LPARAM lParam) { ..... ..... ..... case WM_KEYDOWN: switch (wParam) { case VK_DELETE: int iSlected=0; iSlected=SendMessage(hList,LVM_GETNEXTITEM,-1,LVNI_FOCUSED); if(iSlected==-1) { MessageBox(hDlg,_T("No Items in ListView"),_T"Error"),MB_OK|MB_ICONINFORMATION); break; } SendMessage(hList,LVM_DELETEITEM,0,0); break ; } ..... ...... .... }
AmitI have no trouble with the Delete key, but I handle the list control-specific
LVN_KEYDOWN
message instead ofWM_KEYDOWN
.--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Ford, what's this fish doing in my ear?
-
I have no trouble with the Delete key, but I handle the list control-specific
LVN_KEYDOWN
message instead ofWM_KEYDOWN
.--Mike-- Visual C++ MVP :cool: LINKS~! Ericahist | PimpFish | CP SearchBar v3.0 | C++ Forum FAQ Ford, what's this fish doing in my ear?
was it really working nice? because i have change according. replace WM_KEYDOWN with LVN_KEYDOWN. :confused: Amit