Solved

Destory  window  not working

Posted on 2015-01-06
2
152 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
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: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say 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…
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…
Monitoring a network: why having a policy is the best policy? Michael Kulchisky, MCSE, MCSA, MCP, VTSP, VSP, CCSP outlines the enormous benefits of having a policy-based approach when monitoring medium and large networks. Software utilized in this v…

705 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