Discussion:
Copying an HWND
(too old to reply)
voidxor
2003-12-13 00:15:59 UTC
Permalink
I need to copy an HWND, but code like below will leave hwndcopy NULL. How can I do this?

HWND hwndcopy;
hwndcopy=hwnd;
--
~voidxor
Roy Fine
2003-12-13 05:07:29 UTC
Permalink
VoidXor --

It is most likely because the value if hwnd is NULL. Can you show how the
hwnd variable was initialized or last set?

On an ever so slightly related note - often times we will see the m_hWnd
variable of a CWnd derived class with a value of NULL -- this is most likely
because the window for the class object has not yet been created. This may
or may not have any significance to your problem.

regards
roy fine;
"voidxor" <***@essencecomp.com> wrote in message news:#***@TK2MSFTNGP09.phx.gbl...
I need to copy an HWND, but code like below will leave hwndcopy NULL. How
can I do this?

HWND hwndcopy;
hwndcopy=hwnd;
--
~voidxor

Loading...