c - How to eat keys in WM_KEYDOWN -


im handling wm_keydown message in edit box.
handling bunch of keys, keys (eg. tab) i'd prevent displayable character being appended editbox.

case wm_keydown:     {         switch(wparam)         {         case vk_tab:             //handle tab here             //eat tab key             return 0;         default:             return defwndproc(hwnd,message,wparam,lparam);         }      }      break; 

i can detect , delete tab in wm_keyup message, method tab key visibly added , removed edit box.

is there way of eating key in wm_keydown?

  1. override pretranslatemessage in dialog class.
  2. if msg parameter's message wm_keydown , wparam vk_tab , hwnd of edit control, handle , return true.

returning true means that event has been processed , not processed cedit control.


Comments

Popular posts from this blog

blackberry 10 - how to add multiple markers on the google map just by url? -

php - guestbook returning database data to flash -

delphi - Dynamic file type icon -