Add GetSDWindow() by index

The method CSDForm.GetSDWindow(int idx) return sdWindow index by idx. If
no sdWindow index by idx, return NULL.
Fix GetSDWindow(CPoint &cursor) bug

Before this method fall out infinite loop. Fix the loop by indexing.