Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. How use DDX_Radio in a CDialogBar

How use DDX_Radio in a CDialogBar

Scheduled Pinned Locked Moved C / C++ / MFC
helpquestion
7 Posts 5 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    Crownless
    wrote on last edited by
    #1

    Hi all, i'm trying to use a DDX_Radio in the DoDataExchange of my CDialogBar but when i call the UpdateData to get the DDX value i get an error. Do i have to do some kind of initializaztion befor i can use the DDX controls? Does anyone have any suggestion about how resolve this problem? tnx

    L 1 Reply Last reply
    0
    • C Crownless

      Hi all, i'm trying to use a DDX_Radio in the DoDataExchange of my CDialogBar but when i call the UpdateData to get the DDX value i get an error. Do i have to do some kind of initializaztion befor i can use the DDX controls? Does anyone have any suggestion about how resolve this problem? tnx

      L Offline
      L Offline
      Lost User
      wrote on last edited by
      #2

      Crownless wrote:

      i get an error.

      You need to explain what the error is before anyone can begin to offer any suggested solution.

      C 1 Reply Last reply
      0
      • L Lost User

        Crownless wrote:

        i get an error.

        You need to explain what the error is before anyone can begin to offer any suggested solution.

        C Offline
        C Offline
        Crownless
        wrote on last edited by
        #3

        Debugging I can see that I get the error on the DDX_Radio function that I call in the DoDataExchange of my DialogBar. The error is a "simple" Debug Assertion Failed!

        C 1 Reply Last reply
        0
        • C Crownless

          Debugging I can see that I get the error on the DDX_Radio function that I call in the DoDataExchange of my DialogBar. The error is a "simple" Debug Assertion Failed!

          C Offline
          C Offline
          Cedric Moonen
          wrote on last edited by
          #4

          You should really try to provide all the useful information: - Code snippet + where the code is crashing - Exact error message (if there is a message in the assertion, it is probably for a reason, no?)

          Cédric Moonen Software developer
          Charting control [v2.0] OpenGL game tutorial in C++

          C 1 Reply Last reply
          0
          • C Cedric Moonen

            You should really try to provide all the useful information: - Code snippet + where the code is crashing - Exact error message (if there is a message in the assertion, it is probably for a reason, no?)

            Cédric Moonen Software developer
            Charting control [v2.0] OpenGL game tutorial in C++

            C Offline
            C Offline
            Crownless
            wrote on last edited by
            #5

            well... i'll try to explain better the situation... i have a CDialogBar with this DoDataExchange:

            void CMyDlgBar::DoDataExchange(CDataExchange* pDX)
            {
            CDialogBar::DoDataExchange(pDX);

            DDX_Radio(pDX, IDC_RADIO1, miRadio);
            }

            i create my CDialogBar in my MainFrame and then i call a function for the initialization of my class.

            int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
            {
            if(CFrameWnd::OnCreate(lpCreateStruct) == -1)
            return -1;

            mMyDlgbar.Create(this,
            IDD_DLGBAR,
            CBRS_LEFT | CBRS_HIDE_INPLACE,
            IDD_DLGBAR);

            ShowControlBar(&mMyDlgbar, FALSE, FALSE);

            mMyDlgbar.InitDialog( );

            return 0;
            }

            My InitDialog function calls the UpdateData(FALSE) (or UpdateData(TRUE), it's the same).

            void CMyDlgBar::InitDialog()
            {
            UpdateData(FALSE);
            }

            the UpdateData function calls the DoDataExchange of my class, i get the error on the DDX_Radio function. No particular message is provided when i get the error.

            S S 2 Replies Last reply
            0
            • C Crownless

              well... i'll try to explain better the situation... i have a CDialogBar with this DoDataExchange:

              void CMyDlgBar::DoDataExchange(CDataExchange* pDX)
              {
              CDialogBar::DoDataExchange(pDX);

              DDX_Radio(pDX, IDC_RADIO1, miRadio);
              }

              i create my CDialogBar in my MainFrame and then i call a function for the initialization of my class.

              int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
              {
              if(CFrameWnd::OnCreate(lpCreateStruct) == -1)
              return -1;

              mMyDlgbar.Create(this,
              IDD_DLGBAR,
              CBRS_LEFT | CBRS_HIDE_INPLACE,
              IDD_DLGBAR);

              ShowControlBar(&mMyDlgbar, FALSE, FALSE);

              mMyDlgbar.InitDialog( );

              return 0;
              }

              My InitDialog function calls the UpdateData(FALSE) (or UpdateData(TRUE), it's the same).

              void CMyDlgBar::InitDialog()
              {
              UpdateData(FALSE);
              }

              the UpdateData function calls the DoDataExchange of my class, i get the error on the DDX_Radio function. No particular message is provided when i get the error.

              S Offline
              S Offline
              Selvam R
              wrote on last edited by
              #6

              It may be fail for Dialog Data Validation. you can check miRadio definition. http://msdn.microsoft.com/en-in/library/k48w5b23%28en-us,VS.80%29.aspx[^] http://msdn.microsoft.com/en-in/library/57weza95%28en-us,VS.80%29.aspx[^]

              Thanks and Regards, Selvam, http://www.wincpp.com

              1 Reply Last reply
              0
              • C Crownless

                well... i'll try to explain better the situation... i have a CDialogBar with this DoDataExchange:

                void CMyDlgBar::DoDataExchange(CDataExchange* pDX)
                {
                CDialogBar::DoDataExchange(pDX);

                DDX_Radio(pDX, IDC_RADIO1, miRadio);
                }

                i create my CDialogBar in my MainFrame and then i call a function for the initialization of my class.

                int CMainFrame::OnCreate(LPCREATESTRUCT lpCreateStruct)
                {
                if(CFrameWnd::OnCreate(lpCreateStruct) == -1)
                return -1;

                mMyDlgbar.Create(this,
                IDD_DLGBAR,
                CBRS_LEFT | CBRS_HIDE_INPLACE,
                IDD_DLGBAR);

                ShowControlBar(&mMyDlgbar, FALSE, FALSE);

                mMyDlgbar.InitDialog( );

                return 0;
                }

                My InitDialog function calls the UpdateData(FALSE) (or UpdateData(TRUE), it's the same).

                void CMyDlgBar::InitDialog()
                {
                UpdateData(FALSE);
                }

                the UpdateData function calls the DoDataExchange of my class, i get the error on the DDX_Radio function. No particular message is provided when i get the error.

                S Offline
                S Offline
                SandipG
                wrote on last edited by
                #7

                Check this How to initialize child controls on DialogBar[^] I hope it helps.

                Regards, Sandip.

                1 Reply Last reply
                0
                Reply
                • Reply as topic
                Log in to reply
                • Oldest to Newest
                • Newest to Oldest
                • Most Votes


                • Login

                • Don't have an account? Register

                • Login or register to search.
                • First post
                  Last post
                0
                • Categories
                • Recent
                • Tags
                • Popular
                • World
                • Users
                • Groups