發信人: Wiseman.bbs@bbs.cs.nthu.edu.tw (PoorTelnetD) 日期: 24 Jan 2000 07:45:07 GMT 標題: Re: [SDK] 如何殺掉由別的程式所產生的視窗 ? 信群: tw.bbs.comp.language 看板: programming/A0S8O0O3 來源: <3YYI5J$ivE@bbs.cs.nthu.edu.tw>:24533, 組織: 清華資訊(楓橋驛站) ※ 引述《lokoiyin@hotmail.com (Lo Koi Yin)》之銘言: > DestroyWindow only work with top-level windows, you can verify whether it's > top-level window or not by uisng GetParent. I kill windows by using > PostMessage with WM_CLOSE... this is not elegant but it works for me... > regards, > PhilipTheCat 送WM_CLOSE不一定work喔.. 要是那個視窗的視窗函式自行處理WM_CLOSE, 而不是送給DefWindowProc的話 就不一定會destroy window > "空中雲雀" wrote in message > news:3YXeTe$vbj@bbs.cis.nctu.edu.tw... > > 我查了 DestroyWindow() > > 結果說由別的 thread 所產生的不能殺掉... > > 那如果是由別的程式所產生的視窗, > > 那要如何殺掉呢? 當然我已經知道他的 hwnd 了 > > 這邊的視窗包括很多, 按鈕也是, 反正由 CreateWindow, CreateWindowEx > > 產生的都算, 對話盒也算 > > 謝謝 > > -- > > * Origin: ★ 交通大學資訊科學系 BBS ★ 140.113.23.3> -- ※ Origin: 楓橋驛站 ◆ From: delphi.cs.nthu.edu.tw .