Thread: how to check if an edit box is selected(or the cursor is in it)

  1. #1
    Registered User
    Join Date
    May 2005
    Location
    Toronto, Canada
    Posts
    257

    how to check if an edit box is selected(or the cursor is in it)

    I was wandering if there is a CEdit function( or another) that can return a handle to a selected edit box.

    I would like to use an if statement( something like
    if(there is a selected edit box == true)
    do this to it;

    How would I do it?
    Everything is relative...

  2. #2
    return 0;
    Join Date
    Jan 2005
    Location
    Netherlands
    Posts
    89
    What exactly do you mean by "selected edit box"? If you want to check wether an edit box has the focus, you could do something like:

    Code:
    if(GetFocus() == handleToEditBox) {
        // Do something
    }

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. allegro issues
    By mramazing in forum C++ Programming
    Replies: 1
    Last Post: 01-07-2009, 11:56 PM
  2. edit box
    By beene in forum Windows Programming
    Replies: 3
    Last Post: 11-11-2006, 04:40 AM
  3. WS_HSCROLL in ES_READONLY edit box error
    By Homunculus in forum Windows Programming
    Replies: 4
    Last Post: 02-13-2006, 08:46 AM
  4. check edit box value
    By commissar in forum Windows Programming
    Replies: 2
    Last Post: 02-23-2005, 01:29 AM
  5. Edit Box Questions PT. II
    By Quantrizi in forum Windows Programming
    Replies: 16
    Last Post: 08-12-2003, 10:42 PM