there seems to be a bug in DT_SetTextColor if u put a static text on top of another control the static control background takes the background of the dialog.
In general i am getting strange behavior from static text controls.
example
Function Dialog6

If DT_SetTextColor used, dialog procedure does not receive WM_CTLCOLORSTATIC messages. Don't remember why, probably there is a reason.
If you need WM_CTLCOLORSTATIC and text color, don't use DT_SetTextColor. It's easy to set color on WM_CTLCOLORSTATIC with SetTextColor.

yes i know how to do it that way but then i am faced with other issues of the static control if i change the text .was looking for a way to have a transparent static background and not have to hide then show the control to change the text or invalidate it.

Without DT_SetTextColor, after changing control text probably need to call InvalidateRect hDlg 0 1. It redraws the dialog.
Or you can draw text with text API, eg DrawTextEx. Not so easy. Need to subclass controls and draw text on WM_PAINT. Then don't need static controls.