case WM_NCHITTEST:{ LRESULT lResult = DefWindowProc(.....); if (lResult==HT_CLOSE) { DestroyWindow(hWnd); } return lResult;}
You can also make a window without a border and do a DestroyWindow on a WM_KEYUP with VK_ESCAPE...
(ps: calling PostQuitMessage(0) will work, but is not so nice. Better to call DestroyWindow(hWnd), then do the PostQuitMessage(0) in the WM_DESTROY)
Edited by - baskuenen on July 18, 2000 12:44:15 AM