Thank you Thank you.
I wish I had known about m_pParentWnd before now.
Type: Posts; User: bonkey
Thank you Thank you.
I wish I had known about m_pParentWnd before now.
Your a life saver!
I didn't know there was such a thing as m_pParentWnd.
Thank you Thank you!
The bad code is posted under the windows forum.
Heres my code -- please help.
Use this to register the activeX timer. Then it should run.
Here is a working sample.
Yes. It really is that way. Yes I have stepped through it.
A rule of C++ says that if 2 classes are derived from the same class (both CMailnDlg and CChildDlg are derived from CDialog) then you can...
Thats because of the ActiveX controls need to be registered. I will post the regestration info.
You can just go in and rip out the counter and Text to Speech contol off of the mail dialog, but oyu...
no. It is derived from CDialog.
That is a good idea though, may make my life a lot simpler.
I did post this under windows, but posted here when I thought it was just a pointer problem. I am...
I get an access violation when I try and update the data in the spread sheet.
It looks ugly because I have been stripping and copying and adding new stuff to debug.
To reproduce the problem:
...
It MUST be something with the way I'm calling it.
If I call SaveData() from the constructor of CMainDlg then it works fine. If I call it using the m_pParent pointer then I get the m_hWnd errors. ...
More info:
I added an UpdateData(true); at the beginning of SaveData()
and I get this error:
ASSERT(::IsWindow(m_hWnd)); // calling UpdateData before DoModal?
I know the window is open as...
Nope :(
I'm home now and I had the UpdateData line.
So, when I tried it at work it worked fine, at home No Go!
I'm still stumped.
I think I may have figred it out.
OnOk()
{
UpdateData(true); // <------- Get the data from my edit.
((CMainDlg *)m_pParent->SaveData(data);
}
This isn't my exact code (i'm at work) but this should explain what I am doing.
CMainDlg::OpenChildWindow()
{
CChildDlg *dlg=new CChildDlg(this);
dlg->Create(); //I don't remeber...
I am using a modeless dialog box to gather data and insert it into a CListCtrl and a CList.
I Call the modeless dialog and pass "this" as a parameter.
Inside my dialog constructer I save the...
There must be something wrong with the function. I am having problems with a CList in the same function, if I move it out, it works.
It is in a function called SavePayoutData().
The only thing weird about it is that is is called from another dialog. But I do the exact same thing in my other project with no problems.
Update:
The column headers are created in OnInitDialog(). The InsertItem is in a seperate funtion.
A quick test just proved I was able to do an InsertItem inside OnInitDialog(). Not sure why...
I have used CListCtrl in the past with no problem, but in my current project I get an access violation.
I have traced it down to the face that the m_hWnd in not set. Trying to set it also results...
I found an article telling me to override windowProc. That works.
Now I just have to clean up the app to get rid of the taskbar icon. Almost done now.
I am trying to get my app to respond to clicks on the systray. I am sure there is an easy way to do this, but I am having no luck.
I followed the msdn example, in fact I am using the exact code....
It does work on Linux. But It doesn't work on SUN, IBM, or HP UNIX. :(
It works!
What I ended up having to do was cast between a winsock 1 and winsock 2 structure to get access to the in_addr structure that the inet_ntoa function needed.
Here is my working code:
...
I made this change, but I still get the same result.
I didn't use gethostbyname becase the manual pages say that it is depricated by getaddrinfo.
I know I'm closer than I have been before. I...
I have it ALMOST working. The results in the debuger shows
sa_family 2 unsigned short
- sa_data 0x0031276a "" char [14]
[0] 7 '␇' char
[1] 0 char
[2] -84 '¬' char
[3] 19 '␓' char