1. First thing that you can do - right after calling GetDlgItemText - call GetLastError to get extended error information
2. As I understood, you don't succeed to stop debugger exactly in the line where you are calling GetDlgItemText, don't you? I seems strange, try to put break points in the calling functions. Do you succeed to put break points on previous statements? Is this a callback functions? If yes, may this functions is not called at all?
3. Check the exact number , that is defined by ID_CONTROL - may be in your dialog there is another control with the same number
4. How do you get handler on the dialog???What is hWnd, and where do you get it???
5. Try to check your code via GetDlgItem - see if the returned handler is valid...
6. I prefere to see the order of functions calls of your code, so I will be able to help more
My best regards Issahar Gourfinkel
senior software engineer
Softwatch LTD
Israel