

It does display its caption, set while its creation or modified later. I am sorry that I erred in part of my posting, where I said that static contols by default does nt display any text. Still it returns the original text of the caption when we call GetWindowText function. I am sorry if that is not clear.įor the first part, I have created a control of CStatic derived class, handled the WM_PAINT message of the derived class and changed its displayed text.

In an edit control, if you modify the text by editing, the caption associated with that control also gets changed. As far as I understand, one can write texts on CStatic or CStatic derived objects using DrawText and TextOut functions using its device context, but that does not change the title text associated with it.
