Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........
Started by AdrianFox, February 23, 2009, 02:09:30 am
0 Members and 1 Guest are viewing this topic.
QuoteThe EM_SETSEL message can be used to place a selected range of text in a Windows edit control. If the starting and ending positions of the range are set to the same position, no selection is made and a caret can be placed at that position.
QuoteIf the start is 0 and the end is ÃƒÂ¢Ã¢â€šÂ¬Ã¢â,¬Å"1, all the text in the edit control is selected. If the start is ÃƒÂ¢Ã¢â€šÂ¬Ã¢â,¬Å"1, any current selection is deselected. Edit controls: The control displays a flashing caret at the end position regardless of the relative values of start and end.
Quote from: AdrianFox on February 23, 2009, 10:11:20 amDoesn't seem to make any difference if the variables are -2,-2, or -2,-1, or -3, -3 etc.
Quote from: AdrianFox on February 23, 2009, 10:11:20 amWhere does your quote about EM_SETSEL come from?
Quote from: AdrianFox on February 23, 2009, 10:11:20 am (I'm assuming this is the Windows equivalent of the EB flag)
Quote@EDSETSELECTION is EM_SETSEL
'subroutine to easily append text in an edit control.CONST WM_GETTEXTLENGTH = 0xESub AppendEdit(window win,int id,string text,int addNL) int _textlen:_textlen =SendMessage(win, WM_GETTEXTLENGTH,0,0,id) ControlCmd win, id, @EDSETSELECTION, _textlen, _textlen if(addNL) ControlCmd win, id, @EDREPLACESEL, text + "\n" else ControlCmd win, id, @EDREPLACESEL, text endifEndsub