Recieving Text Input from a Dialog Box

I am trying to recieve input from a dialog box in C++. I am able to execute the box, and prompt the user for their name, and they are able to enter text with no problem. However, I cannot retrieve this text and use it in any way. I have tried using the procedure GetDlgItemText, with parameters HWindow, ID_NAMEEDIT (The ID control of the name), PlayersName (the string supposedly receiving the input), and MAXNAMELEN (the max length of a name). I think the HWindow parameter is what is giving me the trouble. This is supposed to be the handle of the Dialog Box, but this is also the handle of TMyWindow. What handle should I use, or what else should I try?
Here is a copy of my resource file for the dialog box:
#define ID_NAMEEDIT 113