I use the WM_CTLCOLOREDIT button to catch and change the color of the text, how to make it so that I can control which text color. I have all this condition, I can not understand one thing about how to use the SendMessage(hwnd,WM_CTLCOLOREDIT,???,??? function correctly SendMessage(hwnd,WM_CTLCOLOREDIT,???,??? )

What to prescribe instead of questions

    1 answer 1

    WM_CTLCOLOREDIT is a notification. It plays a passive role, like a calback. Therefore, you can control color through this message only by intercepting it in the parent window procedure. Calling it directly is useless.

    But to provoke its generation, it is enough just to redraw the control: InvalidateRect(hwndCtl, nullptr, TRUE);