c++ - win32 Child EDIT is not modified when typing, but can be modified with mouse (copy/paste) -


i developping win32 application (not mfc). main window includes child dialog, has listview (report mode) control. adding in place editing sub items of listview. that, detect double-click (nm_dblclk) in dialog procedure , create child edit window way:

    rect rect;     listview_getsubitemrect(listview,item,subitem,lvir_bounds,&rect);     hwnd edit = createwindowex(ws_ex_clientedge | ws_ex_right, l"edit", l"", ws_child|ws_visible /*|es_wantreturn*/,                     rect.left, rect.top, rect.right - rect.left, 1.5*(rect.bottom - rect.top),                     listview, 0, getmodulehandle(null), null);                     setwindowtextw(edit, buffer);                     edit_limittext(edit, 12);                     edit_enable(edit, true);                     assert(edit != null);                     setfocus(edit);                     m_oldeditproc = (wndproc)setwindowlong(edit, gwl_wndproc, (long)editproc); 

editproc:

if(msg == wm_killfocus) {     destroywindow(wnd); } return callwindowproc(m_oldeditproc, wnd, msg, wparam, lparam); 

it seem ok, except edit control seems not handle modification using keyboard. edit has focus (blinking caret). can change selection using keyboard. can change text using setwindowtext. can modify content copy/paste using mouse. cannot modify content of edit keyboard.

when use winspy, see wm_keydown, wm_char , wm_keyup arriving edit window, no change appears.

i cannot figure out doing wrong.


Comments

Popular posts from this blog

html - Firefox flex bug applied to buttons? -

html - Missing border-right in select on Firefox -

c# - two queries in same method -