Solved

Destory  window  not working

Posted on 2015-01-06
2
141 Views
Last Modified: 2015-01-06
It is required to   close  other  application  from  my  project .I  am  able to find window  by  FindWindow,but  destoy window does  not  destory  it.Will  any  one  able to tell  what should I  do?

CWnd* wnd = CWnd::FindWindow(NULL,_T("EIAQUANT REPORT"));
	DestroyWindow(wnd->m_hWnd);

Open in new window

0
Comment
Question by:ADITYA RAO
2 Comments
 
LVL 4

Accepted Solution

by:
Tom Chadaravicius earned 500 total points
ID: 40534894
::SendMessage(wnd->m_hWnd,WM_CLOSE,0,0);
or
::SendMessage(wnd->m_hWnd,WM_DESTROY,0,0);
0
 

Author Closing Comment

by:ADITYA RAO
ID: 40534901
::SendMessage(wnd->m_hWnd,WM_DESTROY,0,0);  this worked perfectly
1

Featured Post

Free Tool: Subnet Calculator

The subnet calculator helps you design networks by taking an IP address and network mask and returning information such as network, broadcast address, and host range.

One of a set of tools we're offering as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

The following diagram presents a diamond class hierarchy: As depicted, diamond inheritance denotes when two classes (e.g., CDerived1 and CDerived2), separately extending a common base class (e.g., CBase), are sub classed simultaneously by a fourt…
In Easy String Encryption Using CryptoAPI in C++ (http://www.experts-exchange.com/viewArticle.jsp?aid=1193) I described how to encrypt text and recommended that the encrypted text be stored as a series of hexadecimal digits -- because cyphertext may…
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

789 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question