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 6932197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T11:40:31+00:00 2026-05-27T11:40:31+00:00

My application is a windowing application that performs certain complex mathematical algorithms. Because I

  • 0

My application is a windowing application that performs certain complex mathematical algorithms. Because I started with the application a long time ago, most of it is still single-threaded. To be more precise, the main thread executes all the complex calculation logic. It’s important to mention that during the calculations, I show some progress on the screen.

In most cases, the mathematical algorithms only take several seconds, so after the user has started the action, an hourglass (or the running circle in Windows 7) is shown, and a few seconds later the results are shown.

In some cases, the algorithm can take several minutes. During this time, I show the hourglass, and while the algorithm is busy, I show the progress in my window. But, if the user clicks in the application after it has been busy for a while, the Window becomes ‘more white’ (as if a non-completely-transparent piece of plastic is laid over the window), the Window is not updated anymore, and Windows reports ‘the application is not responding’.

I use Qt and I use the Qt function QWidget::repaint to force a repaint while my algorithm is busy. The repaint works for some time, but as said above, Windows seems to block this after a while.

What is the correct way to tell Windows that your application is still busy so that the window keeps on updating? If I enter an explicit message loop, the user might trigger other actions in the application which I don’t want.

  • Is it enough to call PeekMessage?
  • It is enough to call GetMessage?
  • Or should I call DispatchMessage? And how do I prevent the user from starting another action (actually, prevent all user input)
  • Should I call one of these messages every time I update my window, or can I limit myself to call it every few seconds (10 seconds?, 30 seconds? …)

Notice that moving the calculation logic to a separate thread is currently not an option.

I’m using Visual Studio 2010 on Windows 7, in combination with Qt 4.7.

  • 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-05-27T11:40:31+00:00Added an answer on May 27, 2026 at 11:40 am

    The DisableProcessWindowGhosting function (see http://msdn.microsoft.com/en-us/library/ms648415(v=vs.85).aspx) tells Windows that it must not show the ‘ghost window’ if an application is not responsive.

    My colleague did some experiments with it and noticed the following:

    • the animation showing the progress continues nicely (this is actually what I wanted to achieve)
    • the user can still minimize, move, … the window (great)
    • on the downside: if the application is really hanging, the user must use Task Manager to kill it

    So, this solves my problem.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm trying to develop a GUI application for an embedded platform, without any windowing
Application : HTA (therefore IE) This is an application that uses SendKeys to populate
I am started to deal with OpenGL. My application is written in Java using
I'm working with a Win32 application that needs to create a variety of custom
I have an application that on a subsequent start detects if there's a process
My problem is that if I use Eclipse to deploy my Web Application (via
Application Specific Information: com.my-app failed to launch in time Elapsed total CPU time (seconds):
I would like to write a Java terminal application that does screen manipulation. Are
Application use NHibernate. I Have object A that contains set of objects B. I
My application has to detect that the device connected to the Wi-Fi network is

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.