If you put a static text box in your dialog you can set its text to anything you want at runtime. First you need to get the window handle of the text box:
HWND hwndText = GetDlgItem(hwndDialog, IDC_MYTEXT);
Then you can set the new text into it:
SetWindowText(hwndText, L"Hi mom, this is my first text box!");
Static text isn't meant to change, so Windows doesn't always do the right thing when you change it. You need to tell it to erase and repaint so that the new text is properly displayed.
InvalidateRect(hwndText, NULL, true);
与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…