As I said multiple times, m_NOFR is not a window, it is a string, so you should use the method Format and not SetWindowText. But as you also have to update the data after that, it would be even better to put that in a method of CConnectDlg.


But in my opinion, due to the fact that you didn't understand that m_NOFR could not be accessed without using an instant of the dialog class, you should even take more time to understand the basics of object oriented programming and some basic of C++, even before you start working on the MFC. I think it will be hard for you to get the MFC and all that if you don't have some of the basics first.