|
-
April 11th, 1999, 01:27 AM
#1
How get I CWnd pointer
m_AnimateCtrl.Create(WS_CHILD|WS_VISIBLE,rect,this,0);
----
I want use this function my DLL file's dialogbox.
But I could not use "this".
when i use "this" there are happened compile error.
so I use GetSafeHwnd() function.
m_AnimateCtrl.Create(WS_CHILD|WS_VISIBLE,rect,(CWnd *)GetSafeHwnd(),0);
then there aren't happened compile error.
but I can't executed dll file.
Good luck.
thank you for reading it.
-
April 11th, 1999, 04:56 AM
#2
Re: How get I CWnd pointer
Hi !
I don't know, why you can't use the "this" pointer (what compiler error occurs ??).
You can't use
(CWnd *)GetSafeHwnd()
because GetSafeHwnd returns a HWND (which is a handle from a window), and not a pointer to a CWnd (which is a C++-object).
Use
CWnd::FromHandle(GetSafeHwnd()) instead.
Greetings
Martin
-
April 11th, 1999, 08:00 AM
#3
Re: How get I CWnd pointer
This CWnd pointer is pointer to parent window and you cant choose this pointer arbitrary it MUST be pointer to the window there control will appear.
WBR Oak
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
|