I've created a Dialog-based MFC application called "Example" in Visual Studio 2008. In Source Files folder there's an Example.cpp and ExampleDlg.cpp (with corresponding .h files in Header Files folder).
I've also got a simple button called IDC_BUTTON1 and an "edit control" text box called IDC_EDIT2 (with variable 'm_edit1' attached to it). When I run the code below...pushing the button shows "Hi!" in the text box.
All of this code is contained in ExampleDlg.cpp. My question is...how do I move the code to Example.cpp and still have everything work properly? That is, when I push the button, "Hi!" will display in the text box?
m_edit1 = _T("Hello Earth");