CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2009
    Posts
    20

    Help with CEdit controls in MFC

    I am new with MFC and I have an dialog interface contains an button, input box(edit control), and output box(edit control or list control).

    Mainly my problem is when I entered something in the input box(edit control) its remain there and I need after entering to delete the entered text or remove it (clear the input box)

    And the second problem which i need help also is I used for the output box in the first time edit control and the output texts overrided the previous output text and I need to keep the both in the output box window because its like a chatting output window keep the both utterances the entered text and the output text.


    And when I used the List control for the output box its works like list function there is an ordering happened for output texts.


    I need the output texts appears like for example an real chatting via an MSN :


    He says: hello there
    You says:hello


    and how I can make an automatic numbering for the output texts

    2 :he says: i am fine.
    2: you says : how are you?
    1: he says: hello there
    1: you says : hello



    please anyone could help me and it will be appreciated.

    Best Regards,

  2. #2
    Join Date
    Jul 2005
    Location
    Netherlands
    Posts
    2,042

    Re: Help with CEdit controls in MFC

    Quote Originally Posted by hijjawi View Post
    Mainly my problem is when I entered something in the input box(edit control) its remain there and I need after entering to delete the entered text or remove it (clear the input box)
    You can use CWnd::SetWindowText to replace the text in the edit box.
    And when I used the List control for the output box its works like list function there is an ordering happened for output texts.
    If you've made your dialog with the dialog editor, then you can change this in the properties of the list control.
    Cheers, D Drmmr

    Please put [code][/code] tags around your code to preserve indentation and make it more readable.

    As long as man ascribes to himself what is merely a posibility, he will not work for the attainment of it. - P. D. Ouspensky

  3. #3
    Join Date
    Jan 2009
    Posts
    20

    Talking Re: Help with CEdit controls in MFC

    Thanks alot for your help. its works fine.


    best regards,

  4. #4
    Join Date
    Oct 2002
    Location
    Timisoara, Romania
    Posts
    14,360

    Re: Help with CEdit controls in MFC

    To append text to an edit control see this FAQ: http://www.codeguru.com/forum/showthread.php?t=318921.
    Marius Bancila
    Home Page
    My CodeGuru articles

    I do not offer technical support via PM or e-mail. Please use vbBulletin codes.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured