Hi everyone!
I need to "send" data in a notepad every time I write double numbers on edit control and press save. I wrote some code but my dialog (where the edit control is) don't even open when I run the executable. What I've done so far:
I think I must write some code here so the dialog box work fine but I can't it.:
I need to "send" data in a notepad every time I write double numbers on edit control and press save. I wrote some code but my dialog (where the edit control is) don't even open when I run the executable. What I've done so far:
Code:
void CDataDialog::OnBnClickedSave()
{
// TODO: Add your control notification handler code here
CFileDialog dlg(FALSE, L"Text Files (*.txt)|*.txt|Texr Files (*.h)|*.h|", NULL, OFN_OVERWRITEPROMPT, L"Text Files (*.txt)|*.txt|Text Files (*.h)|*.h|");
CStdioFile file;
CString buffer;
CString textfile;
if (dlg.DoModal() == IDOK)
{
file.Open(dlg.GetFileName(), CStdioFile::modeCreate | CStdioFile::modeWrite);
dlg.GetFileName();
file.WriteString(buffer);
file.Close();
}
}Code:
void CDataDialog::OnEnChangeEdit1()
{
// TODO: If this is a RICHEDIT control, the control will not
// send this notification unless you override the CDialog::OnInitDialog()
// function and call CRichEditCtrl().SetEventMask()
// with the ENM_CHANGE flag ORed into the mask.
// TODO: Add your control notification handler code here
UpdateData(TRUE);
}Code:
void CInputView::OnLinefeaturesData()
{
// TODO: Add your command handler code here
CInputDoc* pDoc = GetDocument();
CDataDialog DialogWindow;
}