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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:54:09+00:00 2026-05-18T21:54:09+00:00

I recently ran into a situation where I wanted to use a modeless dialog

  • 0

I recently ran into a situation where I wanted to use a modeless dialog in Win32’s.

Win32: Toolbar dialog seems to never get focus and causes the main window to process slow!?

And I figured out that this was my message loop:

int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nShowCmd) {
    // Doing required stuff here...

    while (GetMessage(&Msg, hWnd, 0, 0) > 0) {
        // Processing messages here...
    }
}

In fact, this message loop works fine as long as I don’t have any modeless dialog, as it works perfectly fine with modal dialogs, since they process their own message loop. My modeless dialog worked flawlessly when I replaced the hWnd instance for NULL. I just don’t get the difference, except that it seems that I get the messages not for one particularly window.

Can someone explain what is making this message loop work inccorectly?

As this one:

while (GetMessage(&Msg, NULL, 0, 0) > 0) {
    // Processing messages here...
}

works flawlessly!

  • 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-18T21:54:10+00:00Added an answer on May 18, 2026 at 9:54 pm

    the difference is pretty obvious: you specified a HWND in GetMessage. So, you are not processing any messages for any other windows, your toolbar included. See the docs for GetMessage

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

Sidebar

Related Questions

A co-worker recently ran into a situation where a query to look up security
I ran into an interesting behavior recently. It seems that if I override .equals()
I recently ran into a situation in which accessing session information from view is
I recently ran into an embarrassing situation with some Flash coding where I had
I recently ran into a problem that I thought boost::lambda or boost::phoenix could help
I recently ran into a issue where intermediate link betweeen a TCP server and
I recently ran into a problem with a COM object that was using a
I'm writing a C parser using PLY, and recently ran into a problem. This
Recently I ran into this error in my web application: java.lang.OutOfMemoryError: PermGen space It's
Here's a problem I ran into recently. I have attributes strings of the form

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.