Newb here and i have a quick question...
How do you add Text into an edit box?
I lloked around and found a similar thread and i tried the solution but didnt work. heres sample
invoke szMultiCat,1,ADDR buffer,ADDR textadd
invoke SetWindowText,hwndEdit,ADDR buffer
buffer is what the user has currently typed in the edit box
textadd is the text i want to add.
Suggestions would be appreciated 8)
How do you add Text into an edit box?
I lloked around and found a similar thread and i tried the solution but didnt work. heres sample
invoke szMultiCat,1,ADDR buffer,ADDR textadd
invoke SetWindowText,hwndEdit,ADDR buffer
buffer is what the user has currently typed in the edit box
textadd is the text i want to add.
Suggestions would be appreciated 8)
Do you mean you want to append to the text already present in the edit? Or just put text into the edit?
1. EM_SETSEL: Set Selected Range.
2. EM_REPLACESEL: Replace it.
invoke SendMessage, hEdit, EM_SETSEL, iStart, iEnd ; i > Max is last.
invoke SendMessage, hEdit, EM_REPLACESEL, 0, addr zStr
http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/editcontrols/editcontrols.asp
2. EM_REPLACESEL: Replace it.
invoke SendMessage, hEdit, EM_SETSEL, iStart, iEnd ; i > Max is last.
invoke SendMessage, hEdit, EM_REPLACESEL, 0, addr zStr
http://msdn.microsoft.com/library/en-us/shellcc/platform/commctls/editcontrols/editcontrols.asp
http://www.asmcommunity.net/board/viewtopic.php?t=19417&highlight=
Ahhh, got it! :lol: Thanks for the help guys :wink: