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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 15, 20262026-05-15T04:39:10+00:00 2026-05-15T04:39:10+00:00

I have a little dialog I created using Resource Editor in VS2005. It’s going

  • 0

I have a little dialog I created using Resource Editor in VS2005. It’s going to be used as a child dialog of another dialog, in 2 different ways… either as a child which sits on top of the dialog like a custom control, or as a popup which can move beyond the boundaries of the parent window. If I modify a single style in the RC file, both of these work as expected – simply substitute WS_POPUP for WS_CHILD to toggle:

IDD_WIDGET DIALOGEX 0, 0, 221, 78
STYLE DS_SETFONT | DS_3DLOOK | DS_FIXEDSYS | DS_CONTROL | WS_POPUP | WS_BORDER
EXSTYLE WS_EX_TOOLWINDOW | WS_EX_STATICEDGE
FONT 8, "MS Shell Dlg", 400, 0, 0x1
BEGIN
    PUSHBUTTON      "Pre&view",IDC_ACTION_PREVIEW,64,59,50,15
    PUSHBUTTON      "M&ore",IDC_ACTION_MORE,115,59,50,15
    PUSHBUTTON      "S&elect",IDC_ACTION_SELECT,168,59,50,15
END

The problem is, I want to be able to choose the behavior when creating the child dialog at run-time as a sort of widget type framework, e.g overriding the RC file style

I tried:

BOOL CMyDlg::OnInitDialog()
{
    CDialog::OnInitDialog();

    m_Widget.Create(IDD_WIDGET,this);
    DWORD oldstyle = m_Widget.GetStyle();
    m_Widget.ModifyStyle(WS_POPUP,WS_CHILD);
    DWORD newstyle = m_Widget.GetStyle();
}

But it makes no difference that I can see, other than that the result of GetStyle changes from 0x8400044C to 0x4400044C… the widget child-dialog starts invisible but when I show it, it retains the WS_POPUP behavior.

What’s wrong, and how can it be fixed?

As Ben suggests, I wonder if this is not a style that can be changed after the window is created, but the problem then is how to intercept the dialog-template structure and modify the style before it’s used to create the window?

  • 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-15T04:39:11+00:00Added an answer on May 15, 2026 at 4:39 am

    I found this article for you: link text

    Looks like InitDialog is too late to change the style. There’s an example of how to do it in this link.

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

Sidebar

Related Questions

I have a really odd behavior here: I created a little popup dialog in
I have a little problem closing my dialog box in JavaScript/jQuery on mouse exit.
I have a simple little dialog that lets user setup a time block. The
I have a little problem with setting the default selected item in Alert Dialog.
I have created a website using MVC3 along with the Razor view engine. What
I have a little problem with an android custom dialog. I construct a custom
I have a cell editor that contains a little button that can be double
In my app I have used an alert dialog builder for button click. So
I have little unusual problem to solve. I need some hint or links to
I have little bit longer question for you - but hope answer will be

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.