Menu

select all in a windows application

2002-08-06
2012-09-26
  • Nobody/Anonymous

    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?

     
    • Nobody/Anonymous

      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)

       
    • Nobody/Anonymous

      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

       

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.