fix one defect:
there is one error in the logic to find the control of a specified window.
Instead of searching all the cached data, it should only search the data
related to the specified window since we have already got the handle of
the window.