hwnd; EnumThreadWindows( GetCurrentThreadId(), setHwnd, 0 ); void setHwnd( HWND foobar, zero) { extern HWND foobar; hwnd=foobar; }