Thread: Edit Box Question

  1. #16
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Originally posted by Ken Fitlike
    >>my status bar is like duplicated (it resizes correctly, but it sticks a copy of itself where it was before resize until I move the cursor down there.<<

    Then adjust the size/position of your edit control to take into consideration any other controls, including your status bar, that occupy the client area of the parent window. Use GetClientRect to get the dimensions of the statusbar control.

    edit:
    >> Also, if a user selects a button to insert something, I'd use WM_GETTEXT and WM_SETTEXT, wouldn't I (to add the text the user selected)?<<

    Time to read up on edit controls.
    ok, thank you. That worked (also after I re-read the tutorial that I got on how to do the status bar).

    Thanks for the link also

  2. #17
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Ok, I've got the insert part working almost to what I need...here's what I have:
    Code:
    SendMessage(hEdit, EM_REPLACESEL, (WPARAM)true, (LPARAM)"'{STAMP 2.0}");
    <<EDIT: All I want to know is how do I put the cursor at (0,0) of the Edit Box (I'm guessin use the GetClientRect() function), then insert that >>
    Last edited by Quantrizi; 08-10-2003 at 02:45 PM.

  3. #18
    erstwhile
    Join Date
    Jan 2002
    Posts
    2,227
    CProgramming FAQ
    Caution: this person may be a carrier of the misinformation virus.

  4. #19
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Originally posted by Ken Fitlike
    EM_SETSEL.
    Thanks. I saw that, but I didn't think it'd work (but it does).

  5. #20
    I am the worst best coder Quantrizi's Avatar
    Join Date
    Mar 2002
    Posts
    644
    Ok, how would I test to see if a certain string is on line 1, and if so, replace it with another string (using the EM_REPLACESEL code)?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. edit box
    By beene in forum Windows Programming
    Replies: 3
    Last Post: 11-11-2006, 04:40 AM
  2. WS_HSCROLL in ES_READONLY edit box error
    By Homunculus in forum Windows Programming
    Replies: 4
    Last Post: 02-13-2006, 08:46 AM
  3. Multiline Edit Box Parser
    By The Brain in forum Windows Programming
    Replies: 6
    Last Post: 11-01-2005, 07:15 PM
  4. setting fixed floats in edit box
    By WaterNut in forum Windows Programming
    Replies: 4
    Last Post: 08-13-2004, 09:13 AM
  5. How do i make a "new line" with in an edit box?
    By Clyde in forum Windows Programming
    Replies: 3
    Last Post: 05-18-2002, 01:35 PM