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 strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

closing a window completely

Status
Not open for further replies.

RADM

Programmer
Dec 27, 2003
36
IT
Hi,

How to actually close a window by using Windows API function? I tried CLOSEWINDOW and DESTROYWINDOW functions. CLOSEWINDOW just minimized the window and DESTROYWINDOW did something like that. I need to close the active window completely. Is there any idea?

Rgs,

RADM
 
Sending it a WM_CLOSE message should work most of the time. If there is an unsaved document open, it might not work, though.

Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
Hi,

But I am using VB6 and want to use API function.

RADM
 
You would use the SendMessage() API for this, passing WM_CLOSE as a parameter.

Chip H.


____________________________________________________________________
Click here to learn Ways to help with Tsunami Relief
If you want to get the best response to a question, please read FAQ222-2244 first
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top