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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 10, 20262026-05-10T22:13:02+00:00 2026-05-10T22:13:02+00:00

I have defined a new dialog and its controls in an already existing resource

  • 0

I have defined a new dialog and its controls in an already existing resource file. I have also created a new file which will handle the events being generated from this dialog. But I am not sure how to connect these two.

Is the statement enum { IDD=IDD_NEW_DIALOG }; all that is required to connect the two? Or should we add some other statement?

  • 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. 2026-05-10T22:13:02+00:00Added an answer on May 10, 2026 at 10:13 pm

    The way this is usually done in MFC is to define a dialog template in the resource editor (as you’ve done), then in C++ derive a class from CDialog and associate it with the dialog template (which it sounds like you’ve done – it’s not entirely clear).

    What actually associates the two is the constructor for your CDialog code. If you look at dialog related code auto-generated by the MFC class wizard, you’ll see in the constructor implementation something like this:

    CMyDlg::CMyDlg(CWnd* pParent /*=NULL*/) : CDialog(CMyDlg::IDD, pParent) 

    where CMyDlg::IDD is defined as an enumeration with a value of your new dialog template’s identifier. It’s this that makes it all happen, not the declaration of the enum. You could modify it to

    CMyDlg::CMyDlg(CWnd* pParent /*=NULL*/) : CDialog(IDD_NEW_DIALOG, pParent) 

    and it will still work (assuming IDD_NEW_DIALOG is the template id of your dialog in the resources), as all that’s happening is the dialog id is being passed into the constructor.

    In general, it’s always worth remembering that, despite initial appearances, MFC does not bind to Windows through bits of compiler magic – it’s all done with C++ and a few macros.

    EDIT: DIALOGEX and DIALOG declare slightly difference dialog resource formats that Windows understands: the former is newer than the latter. However both have been around since at least Windows 95, so it’s not a very significant distinction.

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

Sidebar

Ask A Question

Stats

  • Questions 65k
  • Answers 65k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • added an answer I think this information is passed via messages when establishing… May 11, 2026 at 11:19 am
  • added an answer Don't forget that in C/C++ the compiler needs to be… May 11, 2026 at 11:19 am
  • added an answer If you are allowed to use LINQ, take a look… May 11, 2026 at 11:19 am

Related Questions

I have defined a new dialog and its controls in an already existing resource
Let's say I have defined a route: routes.Add(new Route(Users/{id}, new MvcRouteHandler()) { Defaults =
I have defined a custom Sharepoint list for special attributes related to a software
I have defined a personalizable property on a web part and I would like
I have a GridView control on my page that I have defined a number
I have a unit test where I have statically defined a quite large byte
If I have a type defined as a set of an enumerated type, it's
I have a div container and have defined its style as follows: div#tbl-container {
I have defined an interface in C++, i.e. a class containing only pure virtual
How can I hook up an event to a function name I have defined

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.