|
-
Dec 12th, 2000, 11:04 AM
#1
Thread Starter
Frenzied Member
This is an FYI:
Ok no one could figure out my problem of accessing a function or VAR in a protected class. No one answered my previous two posts about how to send text to an edit box from a function in a different class. So after two frustrating, angery, and sleepless nights I figured it out.
This will allow you access to functions and VARs in a protected class, or any class that you do not want to create another instance of. I am not sure if this is the correct way to do this, but it worked for me.
((NAME OF CLASS*)(AfxGetApp()->m_pMainWnd))->VAR OR FUNCTION
In my previous example:
http://forums.vb-world.net/showthrea...threadid=43722
I could do
((CQueryDlg*)(AfxGetApp()->m_pMainWnd))->PushText("WHATEVER");
For
http://forums.vb-world.net/showthrea...threadid=44107
I can do
((CMainDlg*)(AfxGetApp()->m_pMainWnd))->m_txtOut = "Whatever";
((CMainDlg*)(AfxGetApp()->m_pMainWnd))->m_txtOut = UpdateData(FALSE);
MSVS 6, .NET & .NET 2003 Pro
I HATE MSDN with .NET & .NET 2003!!!
Check out my sites:
http://www.filthyhands.com
http://www.techno-coding.com

Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|