Solved

Destory  window  not working

Posted on 2015-01-06
2
145 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: IP Lookup

Get more info about an IP address or domain name, such as organization, abuse contacts and geolocation.

One of a set of tools we are providing to everyone 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

Suggested Solutions

Title # Comments Views Activity
Cchar * Concating 7 96
Help formatting a Money value. 2 99
linker errors gone with a clean build 2 61
how to change my public IP to any country.... 9 87
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…
Finds all prime numbers in a range requested and places them in a public primes() array. I've demostrated a template size of 30 (2 * 3 * 5) but larger templates can be built such 210  (2 * 3 * 5 * 7) or 2310  (2 * 3 * 5 * 7 * 11). The larger templa…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

713 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