I created a main dialog window with a child dialog window embedded. The child dialog is created using the style
DS_SETFONT | DS_FIXEDSYS | DS_CONTROL | WS_CHILD | WS_VISIBLE | WS_TABSTOP
Everything is good but GetDlgItem(hDlgMain, IDD_DLG_CHILD) doesn't work.
I found that GetDlgItem doesn't work with Dialog Template ID, it should use control ID.
What is the best way to get the handle of the child dialog in this case? (Do not use global or static variables to store child windows' handles).