When you use the WS_CHILD style you can not use a menu.
The HMENU param is then converted into a int ID# for your child (dlg or ctrl).
Use a hash define (diff for each child)
ie
#define IDC_EDIT 10001
then use the parent HWND in
GetDlgItemText(hParent, IDC_EDIT, sBuffer, sizeof( sBuffer ));