Well, if pWnd is NULL, your test would produce an empty string...
To OP: did you create CEdit ontrol? In the window that you are trying to get to it? With ID of IDD_EDIT1? Before you access it?