Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

HWND

Status
Not open for further replies.

SteveD73

Programmer
Jan 5, 2001
109
GB
Hi

I am calling a function which requires a HWND in the parameter. The function is being called from the view class. How can I obtain the HWND from the view class?

Thank you
 
All classes derived from CWnd can be have operator HWND. Try to use theirs class name instead of handle. If it is not working, try something as GetHandle(..) or Handle(), I don't know exactly John Fill
1c.bmp


ivfmd@mail.md
 
Two possibilities:
1.GetSafeHwnd() is a function of CWnd class. CView is a CWnd derived class so you can use it.
2.Use m_hWnd member of the CWnd derived class.

If you will need to get a pointer from a handle consifder the function FromHandle.

Hope this helps,s-) Blessed is he who in the name of justice and good will, shepards the week through the valley of darknees...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top