News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

LVN_ENDLABELEDIT

Started by elmo, March 27, 2011, 06:41:19 AM

Previous topic - Next topic

elmo

how can i get the text i enter after editing a lable of a listview item?
according to m$ the handle of the new created edit while editing the item is destroyed and there for i need to save the text and to reSet it's new text.

invoke SendDlgItemMessage,hWnd,ID,LVM_EDITLABEL, index, 0

i was thinking about
mov hEdit,eax
and get the new text from that handle, but as m$ said is that the edit is destoryed..
be the king of accounting programmer world!

elmo

owh this the answer (LVN_ENDLABELEDIT)

.if uMsg == WM_NOTIFY
.elseif wParam == idListView
mov eax, lParam
assume eax:PTR NMHDR
.if [eax].code == LVN_ENDLABELEDIT
assume eax:ptr LV_DISPINFO
.if [eax].item.pszText != NULL
ListView_SetItemText hwndListView, [eax].item.iItem, 0, [eax].item.pszText
.endif
assume eax:nothing
.endif
.endif


but I fail to get the value of text which i enter.
can someone please help me on this part?
thank you
be the king of accounting programmer world!

xandaz

    I'm sorry for reviving an old thread but i'd like to know if it's possible to enable label edition for a subitem. Does anyone know how to do this?

fearless

Following on from this post: http://www.masm32.com/board/index.php?topic=17551.msg148170#msg148170

Ive updated my example to create an editbox in place of the subitem cell (in the example the 2nd col is an editable as a edit box, by default all text is selected and | caret is available for use)

Also added some custom messages to allow for specific allowed masks of data in Combo Drop Down (combo with the editbox portion) and editbox (2nd col example) - some stuff still might be left untested, but gives you an idea on how the custom messages and masks can be implemented (optional)

Couldnt get the datetimepicker combo to work correctly, issues with getting the constituent parts of that control - altho there is a function supported by vista or win7 (forget exact details) i think that allows it and i could of used it but wanted an xp compatible solution.

The editbox contents are saved if user presses ENTER or TAB, and are not saved if user moves away with mouse (clicking on another cell for example)
ƒearless

donkey

Quote from: xandaz on March 03, 2012, 02:54:03 PM
    I'm sorry for reviving an old thread but i'd like to know if it's possible to enable label edition for a subitem. Does anyone know how to do this?

I think I can put together an example for you.
"Ahhh, what an awful dream. Ones and zeroes everywhere...[shudder] and I thought I saw a two." -- Bender
"It was just a dream, Bender. There's no such thing as two". -- Fry
-- Futurama

Donkey's Stable

xandaz

    Nice elmo...Thanks....good example....Thanks donkey.  :U