ATTR_TITLE_BACKCOLOR is a panel attribute, not a control attribute, so you need to call SetPanelAttribute (g_hchild1, ATTR_TITLE_BACKCOLOR, VAL_DK_GRAY), not SetCtrlAttribute (...)
For this to work you also need to set the Title bar style to 'classic'