from CString* to CString something wierd....
CString adress;
for(int l=0;lGetLength();l++)
{
adress.SetAt(l,m_DownloadAdress->GetAt(l));
}
this works if i put it in the main dialog, but if i put it in a modeless dialog i get an aplication error: "the instruction at 0x5.... referenced memory at 0x0000000. The memory could not be read"
any ideas why?
Step through it and figure out which pointer is null.
Sometimes you do something silly and try to use a bad pointer, sometimes the compile mucks up and you need to force it to rebuild the project.
Sometimes you do something silly and try to use a bad pointer, sometimes the compile mucks up and you need to force it to rebuild the project.
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
hmmm m_DownloadAdress is NULL?! wierd. is it correct if i atempt to get a string from an edit box in the main dialog this way:
CString *m_DownloadAdress=(CString*)GetDlgItem(IDC_EDT_DOWNLOAD);
if not than thats the problem right? this pointer is bad.
CString *m_DownloadAdress=(CString*)GetDlgItem(IDC_EDT_DOWNLOAD);
if not than thats the problem right? this pointer is bad.
I don''t think the value returned by GetDlgItem is persistent. I had many problems initializing a CStatic* OnInitDialog and using it OnIdle. It works if you do the GetDlgItem right before you need to use it. Also, if you use the class wizard, you can add a CString or the particular control class to your project (and they are presistent), though you have to call UpdateData(true or false depending on which way you want the update to go) for the CString''s to get updated. Add the Control and muck with it directly, that''s what I ended up doing.
And Address has two d''s. :p
And Address has two d''s. :p
- The trade-off between price and quality does not exist in Japan. Rather, the idea that high quality brings on cost reduction is widely accepted.-- Tajima & Matsubara
This topic is closed to new replies.
Advertisement
Popular Topics
Advertisement
Recommended Tutorials
Advertisement