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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 21, 20262026-05-21T02:37:46+00:00 2026-05-21T02:37:46+00:00

I am currently providing information to the user with a message box in my

  • 0

I am currently providing information to the user with a message box in my C program, but the message box is appearing behind all other forms of my application.

How can I bring it forward so that it appears in front of all my forms, or set its parent?

Here is the code I’m currently using to show the message box:

MessageBox(0,error_msg, "Error - No Algorithm", MB_OK );
  • 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-21T02:37:47+00:00Added an answer on May 21, 2026 at 2:37 am

    The reason it’s appearing behind all forms now is because you’ve not specified an owner window. That causes it to appear directly on top of the desktop window. The problem is that your other windows are already covering up the desktop window, so they blissfully continue to cover up your message box, too.

    The solution, as you suspect, is to specify one of your windows as the owner for the message box. You do that by specifying their window handle (HWND) as the first argument to the function:

    MessageBox(hWnd,                    // the window handle for your owner window
               error_msg,               // the message to be displayed
               "Error - No Algorithm",  // the title
               MB_OK);                  // flags indicating contents and behavior
    

    The documentation provides additional information.

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

Sidebar

Related Questions

Currently, I am writing a MiddleWare application that synchronizes information between and accounting application
I'm new here so sorry for not providing all information I should to get
I'm currently working on a auto-user-language-detection for providing the content in the user's language.
I am currently profiling my node.js application.I found this blog: http://blog.nodejs.org/2012/04/25/profiling-node-js/ that suggests I
Currently I am using HTML files for parts of my user interface. I display
In order to debug failing requests I would like to print all information coming
I am currently working on a very large legacy MFC MDI application. It has
I am currently involved in porting a large and complicated VBA application to .NET
I have an application currently using the 1.0 version of ent-lib, which I am
I'm currently working on an application consisting both of a webapplication and client software.

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.