Hey,
I think the problem is in the last param of the function.
Code:
TCHAR name[36]; //this is the buffer for the text to be stored in
//now execute the function
GetDlgItemText(hWnd, NAME, name, sizeof(name));
Thats how everything should look and that should work, the only other thing i can think of is that 36 chars may not be big enough to hold the string or maybe it is?, also make sure you are using this code inside your dialog proc function so you have the right handle for the first parameter (hwnd). And if it still dosnt work then im not sure but check that NAME is the correct ID and everything.... but as i say i think the code i gave you should fix it.
Hope thats of some help,
TNT