Post by g***@hotmail.comI generated a new dialog box and need a simple way to pass a variable to the new static text called IDC_TEXT in this dialog box?
In general, for controls are two standard ways for doing so:
1) Use the Dialog Data Exchange (DDX), which transfers data to or from a control.
2) Get a pointer to the control and use SetWindowText.
For a static control, I don't think (1) is applicable (for transferring text). So, for (2), you would get a CStatic * to your control by using either GetDlgItem(IDC_Text), or by using DDX to get a "control variable". The latter can be done easily using Visual Studio's Class Wizard, or just right-click the control in the Dialog Editor and choose "Add variable".