Change Text of a CText Static
Posted on 2003-02-24
I have several CText static text areas on a dialog in my application. I'm trying to change the text contained within them when certain events occur. Specifically, I'm trying to print the name of the file opened to the static text control. I have all the code in place to give me the filename from CFileDialog, but cannot implement the change to the static text controls. I previously did this with edit boxes, but I would like to convert to static texts for a more polished look. I was thinking along the lines of getting a pointer to the control and using *ptr->SetWindowText(str_Text) but was unable to do it. I would appreciate any help offered. Thanks in advance.