Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9203223
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 17, 20262026-06-17T23:25:34+00:00 2026-06-17T23:25:34+00:00

Until I touch the richedit window by mouse its contents are live updated, but

  • 0

Until I touch the richedit window by mouse its contents are live updated, but hovering the mouse over it turns arrow into hourglass cursor. The window then doesn’t react to three or four consequent tries to move it by title bar. When it finally does react to mouse dragging it moves fine but stops refreshing its contents and the title bar becomes empty. Similar effect is when I try to click the client area of the window. This time after a few clicks with no reaction window also stops updating and its title bar turns to (not responding).

When the loop eventually stops the program comes back window updates and comes back ‘alive’. What to do to be able to manipulate the window (and see it’s updating content) while it’s client area is updated ?

#include <windows.h>
#include <sstream>

int main() {
  using namespace std;
  LoadLibrary("Msftedit.dll");
  HWND richeditWindow = CreateWindowExW (
    WS_EX_TOPMOST,
    L"RICHEDIT50W", 
    L"window text",
    WS_SYSMENU | WS_VSCROLL | ES_MULTILINE | ES_NOHIDESEL | WS_VISIBLE,
    50, 50, 500, 500,
    NULL, NULL, NULL, NULL
  );

  for (int i = 0 ; i<100000; i++) {
    wstringstream wss;
    wss << i << L", ";
    SendMessageW(richeditWindow, EM_REPLACESEL, FALSE, (LPARAM) wss.str().c_str());
  }

  MSG msg;
  while( GetMessageW( &msg, richeditWindow, 0, 0 ) ) {
    TranslateMessage(&msg);
    DispatchMessageW(&msg);
  }
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-17T23:25:36+00:00Added an answer on June 17, 2026 at 11:25 pm

    Found answer this is my revised code, look at PeekMessageW and DispatchMessageW.

    #include <windows.h>
    #include <iostream>
    #include <sstream>
    
    int main() {
      using namespace std;
      LoadLibrary("Msftedit.dll");
      HWND richeditWindow = CreateWindowExW (
        WS_EX_TOPMOST,
        L"RICHEDIT50W", 
        L"window text",
        WS_SYSMENU | WS_VSCROLL | ES_MULTILINE | ES_NOHIDESEL | WS_VISIBLE,
        50, 50, 500, 500,
        NULL, NULL, NULL, NULL
      );
    
      MSG msg;
      for (int i = 0 ; i<100000; i++) {
        wstringstream wss;
        wss << i << L", ";
        SendMessageW(richeditWindow, EM_REPLACESEL, FALSE, (LPARAM) wss.str().c_str());
        if (PeekMessageW(&msg, richeditWindow, 0, 0, PM_REMOVE)) {
          TranslateMessage(&msg);
          DispatchMessageW(&msg);
        }
      }
    
      while( GetMessageW( &msg, richeditWindow, 0, 0 ) ) {
        TranslateMessage(&msg);
        DispatchMessageW(&msg);
      }
    }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm a newbie to all the Sencha Touch stuff, but until now I'm very
Until yesterday everything was normal but today i try to lauch my application using
Until now I've been only writing console applications but I need to write a
I'm aware that there are several Cocoa Touch/iPhone calendar implementations available online, but for
I've been developing Rails for a while, but somehow avoiding using capistrano until now.
I would like to create an input field where you can click/touch into and
I've been working on touch events and have some code working quite nicely, until
Until now I've always used the ASP.NET MVC framework source for debugging ASP.NET MVC.
Until recently I'd considered myself to be a pretty good web programmer (coming up
Until Windows Vista, ATI and nVidia supported a feature called horizontal span, which combined

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.