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

    updating my CEdit control



    I have a dialog based application. I am using SetWindowText to output some message in my CEdit control. I have several messages I want to show in one function. So let say I press the OK button, the CEdit control will show "Starting", "Downloading", "Completed" in sequence. However it seems that the CEdit control will only update once at the end of the function. So only the message "Completed" is shown at the end. What code should I add in to force windows to update my CEdit control several times in a function? Thanks

  2. #2
    Join Date
    Apr 1999
    Posts
    16

    Re: updating my CEdit control



    Sounds like you are not using UpdateData(FALSE) to update your CEdit

    after each of your SetWindowTexts.


    Or maybe the three mesages are being written,but too fast for you to notice?

    If Im way off pls let me know

  3. #3
    Join Date
    Mar 1999
    Posts
    5

    Re: updating my CEdit control



    I added in UpdateData(FALSE) but it still doesn't work but I did a search on that and it seems that there is a UpdateWindows. I tried that and it works. Thanks for the reply.

  4. #4
    Join Date
    Mar 1999
    Posts
    22

    Re: Try ::Sleep function



    Hi.

    Try ::Sleep API function.

    For example,

    CMyEdit->SetWindowText("Starting"

    ::Sleep(3000); //3 second to show "Starting"

    CMyEdit->SetWindowText("Downloading"

    ::Sleep(3000);

    CMyEdit->SetWindowText("Completed);

    This is not one function.

    However, actual FTP program seems to use the other process.

    When you try to show FTP process, I don't know it yet.


    Hope for help.

    -Masaaki Onishi-








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