|
-
March 31st, 1999, 10:41 AM
#2
Invalid casting
CWnd::GetParent() returns a CWnd*. You can't cast this to a CDocument*, because CDocument and CWnd aren't related. Assuming that you're creating the dialog from your view class, you could create a new constructor for the dialog that allows you to pass a CDocument* into it. Then you could construct your dialog thus:
CMyDialog dlg(GetDocument());
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
|