Link to home
Start Free TrialLog in
Avatar of police1
police1

asked on

HWND? CWnd?

ok.. I am trying to change the info on my system tray icon, but don't know how to get the HWND from my project. Here is a bit of info.

I am not changing the info from a place I can get it from easy.  So that eliminates  m_hWnd.   When I try to use AfxGetApp()->GetMainWnd();   It says that, that is a CWnd... not an HWND.   Is there any function (like the AfxGetApp)  That will let me get the HWND of my applications main window?  The icon was created with -GetSafeHwnd();... which is not available from my other class.

Thanks.
Avatar of ekc
ekc

CWnd has a public member variable m_hWnd.
ASKER CERTIFIED SOLUTION
Avatar of ekc
ekc

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial
Hi,
Use GetSafeHwnd() that should be doing ur job.
-Shilpa
shilpa_Jb...
Please, don't lock the questions and try to post only comments, especially if there are some answers which are as good candidates for the correct one as your own...
Avatar of police1

ASKER

GetSafeHwnd() is not available in the other class, as stated in my question.
Avatar of police1

ASKER

Thanks man... that worked great. :)