How use DDX_Radio in a CDialogBar
-
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
-
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
-
Crownless wrote:
i get an error.
You need to explain what the error is before anyone can begin to offer any suggested solution.
-
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!
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++ -
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++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.
-
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.
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
-
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.