I am looking for a way to modify the caption of a checkbox in a MFC dialog at runtime.

// With associated member variable to the checkbox
m_Checkbox.SetWindowText("Caption");

does not work. GetWindowText shows an empty string and

SetWindowText does nothing.

The mfc help says "If the window is a control, the text within the contol is set" (not the caption)

How to set the caption? Am I doing something wrong in SetWindowsText or is it not the correct way?

Thank you for your help