CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 9 of 9

Thread: Destroy Window

  1. #1
    Join Date
    May 1999
    Posts
    216

    Destroy Window

    How to destroy the window?
    I have HWND pointer(by using the FindWindow(), but i cant close the application? or is there a standart way to close an application?
    Can anyone help me out please!
    Thanx in advance.


  2. #2
    Guest

    Re: Destroy Window

    Try the API DestroyWindow(HWND hWnd)

    I hope it help
    Marc
    Industrial Software Developer


  3. #3
    Join Date
    May 1999
    Posts
    13

    Re: Destroy Window

    DestroyWindow( HWND ) only works if the HWND window is created by the same thread which is trying to destroy it. This is probably not the case when you're using FindWindow



  4. #4
    Join Date
    May 1999
    Posts
    116

    Re: Destroy Window

    Try sending (or posting) a WM_QUIT message to it.


  5. #5
    Join Date
    May 1999
    Location
    Sydney, Australia
    Posts
    420

    Re: Destroy Window

    Try sending a WM_CLOSE to the window to detroy it
    and posting a WM_QUIT message to the application to kill it

    Sally



  6. #6
    Join Date
    May 1999
    Location
    Sydney, Australia
    Posts
    420

    Re: Destroy Window

    Hmmm,

    Try sending a WM_CLOSE to the window to detroy it
    and posting a WM_QUIT message to the application to kill it

    Sally



  7. #7
    Join Date
    May 1999
    Posts
    216

    Re: Destroy Window

    Thanx for the help!


Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  





Click Here to Expand Forum to Full Width

Featured