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

  • Home
  • SEARCH
  • 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 1001851
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T07:44:26+00:00 2026-05-16T07:44:26+00:00

I have a pretty basic understanding of the GUI thread and the message loop,

  • 0

I have a pretty basic understanding of the GUI thread and the message loop, but I’m curious as to how that applies to one window starting a modal window. If I had to guess, I’d say that both windows are being run under the same GUI thread and that some parameter indicates that only events with the child window (the modal one) be executed, otherwise point out the modal window to the user.

This is simply a semi-educated guess and I accept that I may be wrong from square one. I’m not even sure if “GUI thread” is the right name for that thread, but people usually can guess what I’m talking about.

So in short, how do threads and modal windows get along together?

  • 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-16T07:44:27+00:00Added an answer on May 16, 2026 at 7:44 am

    This maybe contradictory, but no, no new thread is started for the new windows. However, a new message loop is opened. This keeps messages flowing through Windows and avoids halting other applications.

    Messages will arrive and may be dispatched to the owner window’s message loop. On the owner window, keyboard and mouse input have been disabled, but all other messages will be send through. Note from Hans Passant: actually, all top level windows of the same thread will be disabled this way.

    As an example that you already touch on in your question, WM_PAINT is send through to the parent window. But also WM_TIMER, for instance. A message like WM_NCHITTEST will not be send through, as it is an input message. Nor will WM_KEYDOWN and similar.

    This way, a messagebox can be moved, and the underlying owner gets neatly repainted, or a ticking clock still continues ticking.

    Information partially from Rector and Newcomer’s Win32 Programming, page 752+, old, but still valuable and valid info. This info applies to DialogBox, DialogBoxParam, DialogBoxIndirect and DialogBoxIndirectParam as well as any of the ..Ex versions. Internally, these Win32 API functions are called by WinForms.

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

Sidebar

Related Questions

I have a pretty basic problem but I can't seem to figure it out...
Pretty basic programming question, I know PHP have a function for it, but does
I realize this question is pretty basic, but I'm really stuck. I have a
I have a very basic doubt regarding cloud computing that is catching up pretty
I have a pretty basic assignment, but am having an issue making my main
I have a pretty basic app flow that is quite linear, so it fits
I have some pretty basic HTML/CSS that isn't working as I expect. Basically I
I have a pretty basic question that I imagine would require a join to
I have a pretty basic java applet that allows users to use a signature
I have a pretty basic jQuery ajax thing happening, but I want to mix

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.