Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Windows API
  4. VK_DELETE is not working for child window

VK_DELETE is not working for child window

Scheduled Pinned Locked Moved Windows API
help
3 Posts 2 Posters 10 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • A Offline
    A Offline
    amitmistry_petlad
    wrote on last edited by
    #1

    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

    M 1 Reply Last reply
    0
    • A amitmistry_petlad

      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

      M Offline
      M Offline
      Michael Dunn
      wrote on last edited by
      #2

      I have no trouble with the Delete key, but I handle the list control-specific LVN_KEYDOWN message instead of WM_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?

      A 1 Reply Last reply
      0
      • M Michael Dunn

        I have no trouble with the Delete key, but I handle the list control-specific LVN_KEYDOWN message instead of WM_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?

        A Offline
        A Offline
        amitmistry_petlad
        wrote on last edited by
        #3

        was it really working nice? because i have change according. replace WM_KEYDOWN with LVN_KEYDOWN. :confused: Amit

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups