Dear Programmers, i am working on a text program and i would like to add a select all feature. Does anybody have source code to put in the case statement for the select all feature?
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
If you are using an standard control, then there are messages available. Look it up in MSDN. If not, you have to do the code yourself (inverting the colour of selected text)
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
SendMessage(windowhandle, EM_SETSEL, 0,-1);
will select all the text in the edit control windowhandle
SendDlgItemMessage(Parentwindow,controlid, EM_SETSEL, 0,-1);
selects all text in the control identified by controlid
If you would like to refer to this comment somewhere else in this project, copy and paste the following link:
Dear Programmers, i am working on a text program and i would like to add a select all feature. Does anybody have source code to put in the case statement for the select all feature?
If you are using an standard control, then there are messages available. Look it up in MSDN. If not, you have to do the code yourself (inverting the colour of selected text)
SendMessage(windowhandle, EM_SETSEL, 0,-1);
will select all the text in the edit control windowhandle
SendDlgItemMessage(Parentwindow,controlid, EM_SETSEL, 0,-1);
selects all text in the control identified by controlid