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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 11, 20262026-06-11T17:05:22+00:00 2026-06-11T17:05:22+00:00

After working in C# for years, I’ve returned to an old MFC application I

  • 0

After working in C# for years, I’ve returned to an old MFC application I wrote. But it looks like I need a refresher on a few things.

I added a check box control to an existing dialog box. I then used Class Wizard to add a non-control variable of type bool. The variable was created as expected.

However, I see no entry was added to the DoDataExchange() method. And when I tried adding it manually:

DDX_Check(pDX, IDC_PRINT_SUMMARY, m_bPrintSummary);

I get the IntelliSense error:

a reference of type “int &” (not const-qualified) cannot be initialized with a value of type “bool”

1. Why wasn’t an entry in DoDataExchange() created for me when I added the variable?

2. If DDX_Check() expects and int &, why did Class Wizards default to type bool for a checkbox value?

  • 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-06-11T17:05:23+00:00Added an answer on June 11, 2026 at 5:05 pm

    A check box can be one of three values, hence the need for the int.

    BST_CHECKED – Button is checked.

    BST_INDETERMINATE – Button is grayed, indicating an indeterminate state (applies only if the button has the BS_3STATE or BS_AUTO3STATE style).

    BST_UNCHECKED – Button is cleared

    As to why it’s not auto editing the DoDataExchange, it’s probably an issue with the C++ formatting of your class.

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

Sidebar

Related Questions

Kinda of embarrassing to ask this question after few years working with Hibernate... I
I have some code I wrote a few years ago. It has been working
I'm new to Java after working for a few years in PHP and I'm
I'm working on an application that I need to be cross-platform. I'd like to
After three years working on a C++ project, the executable has grown to 4
After working in Eclipse for the past 3 years and memorizing all of the
I'm working with someone who's looking to get back into programming after several years
I am back into c/Linux. The question might look stupid, but relevant after working
After 3 years working as an IT Support Technician, I decided to change of
I really hate working with IComparer - to this day, after years of working

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.