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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 17, 20262026-05-17T22:11:43+00:00 2026-05-17T22:11:43+00:00

I have a window with the following properties set int he .rc file: STYLE

  • 0

I have a window with the following properties set int he .rc file:

STYLE DS_SETFONT | DS_MODALFRAME | DS_FIXEDSYS | WS_POPUP | WS_CAPTION | WS_SYSMENU

It has an associated class (derived from CDialog) and when I instantiate it, then call that object’s DoModal() on
it it is not really modal – I can click on the “parent” window.

CMyDlg dlg;
int result = dlg.DoModal();

The “parent” window is a dlg box but treated as a main window. its properties are:

STYLE DS_SETFONT | DS_FIXEDSYS | WS_MINIMIZEBOX | WS_POPUP | WS_CAPTION | WS_SYSMENU | WS_THICKFRAME
CAPTION "My Main App"
MENU IDR_MENU_MAIN

Other dlg boxes I call from the main window with DoModal I WANT to leave as not modal. But this other one I would like to have modal.

I am a bit confused about what is going on. Can someone explain how to get this “child” dlg box to be modal (while allowing other “children” not to be modal?

Additional information:

The GUI for this app is not the main thread of the app. It is a command line app that starts another thread and loads a DLL which contains the GUI in it. I am not sure if this has any bearing on the issue.

Main dlg window == A
This new dlg box window I want to behave as modal == B
A different dlg box == C

Within A : calling B.DoModal is not modal, but I would like it to be
Within A : calling C.DoModal is not modal, and I want to keep it that way

Within C, if i call D.DoModal it is modal and I want to keep it that way (so the app does show modal functionality)

More scary information

From A:
calling the standard file open or save as dlg boxes result in NON MODAL dlg boxes.

CFileDialog dlg(TRUE);
dlg.DoModal();

This is not desirable either.

These two questions seem to have some good possibilities for one of the issues, but they do NOT address how to make sure the standard file open/save dlgs that get called are modal…

Convert a modeless dialog to modal at runtime
How do I create Modal dialog in worker thread(Non-UI thread)?

  • 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-17T22:11:43+00:00Added an answer on May 17, 2026 at 10:11 pm

    I don’t see that you’re specifying a parent window for your modal dialogs.

    Perhaps that’s what’s lacking.

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

Sidebar

Related Questions

I have the following set-up: A Window that has a splitView in which I
I have the following extJs window which has two tabs in it. One of
I have a window with the following elements, and I'm trying to access the
I have the following application: I have 1 window. On that window I add
I have a window with a MenuItem maddbound3 with the following ActionListener: maddbound3.addActionListener (
I have the following code to create my window, my view and my sub
I have the following code that opens a new popup window while disabling the
I have the following code which creates a simple window with two buttons which
I have the following HTML that pops up a window when I click the
I have the following javascript. window.location.href = _searchUrl + query.replace(/\s+/g, '+') .replace('/', '-') .replace('\\','-')

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.