But I thought DDV_MinMax is a standard function? Can anyone help me out? THanks! Below is my code
[CODE]
void CDialog1Dlg::DoDataExchange(CDataExchange* pDX)
CDialog::DoDataExchange(pDX);
// DDX_Control(pDX, IDC_LIST_CTRL, m_cListCtrl);
DDX_Control(pDX, IDC_NAMELIST, m_NameList);
DDX_Text(pDX, IDC_FIRSTNAME, m_strFirstName);
DDX_Text(pDX, IDC_LASTNAME, m_strLastName);
DDX_CBIndex(pDX, IDC_TITLE, m_strTitle);
DDX_Text(pDX, IDC_nocluster, m_nocluster);
DDX_Control(pDX, IDC_CHARTCTRL, m_ChartCtrl);
//>>AFX_DATA_MAP
It'd DDV_MinMaxInt and not DDV_MinMax.
franzissgmail 4-Sep-06 2:53 Rupesh Shivarkar 27-Jun-06 20:38I want to display my file name in EDIT control which is on dialog box .
but the problem i am facing is :
filePath=FilePath;
this->DoModal();
m_Filepath.SetWindowTextA(filePath);
but the debugger stops at this->DoModal(); so no execution of line 3.
after clicking any button it is looking for line 3 .
so can i use DDX mechsnism here .
so how to resolve this problem .
waiting for replay .
What I understand from your problem you just want to show the name of a file in the edit box, if you associate a CString variable to your control using the Class Wizard or Add Variable dialog then DDX mechanisms are automatically set for you.
Your code is surely incorrect, please post the exact code for me to have a look. Meanwhile, to show the name of a file you can try something like this:
[code]
//m_Edit is CEdit instance of edit control
m_Edit.SetWindowText (strFileName);
OR
GetDlgItem (IDC_EDIT)->SetWindowText (strFileName);
OR
//m_strEdit is CString variable associated to the edit box
m_strEdit = strFileName;
UpdateData (FALSE);
[/code]
Another thing is that you don't need to call SetWindowTextA or SetWindowTextW, just call SetWindowText. Depending on your Unicode settings it would resolve to either of them.
Rupesh Shivarkar 28-Jun-06 21:06U r correct DDX mechanism are found to be set for me so before calling DOModal() function .
i am setting filename in DoDataExchange() and it is working fine .
Last Visit: 31-Dec-99 18:00 Last Update: 6-Sep-24 1:37 | Refresh | 1 |
General News Suggestion Question Bug Answer Joke Praise Rant Admin
Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.