Click to See Complete Forum and Search --> : getting a HWND for a window
June 22nd, 1999, 05:03 AM
what is the best way to get a HWND for a window when inside another window.
i have to get a HWND instead of a CWnd, because im using a callback function
(TimerProc) which reguires a HWND.
or
a way to get a CWnd and them get a HWND from that
thanks
Paul
ric
June 22nd, 1999, 05:19 AM
Use GetSafeHwnd();
balak yap
June 22nd, 1999, 05:36 AM
If you mean you want to get the HWND of a chirldren window for the parent window.
you can use FindWindowEx.
Hope i didn't get you wrong..
Hello World!!!
June 22nd, 1999, 05:42 AM
i want to get the HWND of a parent from a child
balak yap
June 22nd, 1999, 05:47 AM
From Visual C++ help
"The GetParent function retrieves the handle of the specified child window’s parent window."
HWND GetParent(
HWND hWnd // handle of child window
);
This is want you want????
Hello World!!!
July
June 23rd, 1999, 12:12 AM
You can first use GetParent()Member function inorder to get a CWnd object of
the parent.Then using that ...you can find HWND by using GetSafeHwnd()
codeguru.com
Copyright Internet.com Inc., All Rights Reserved.