开发者

how do I set a value of a textbox in Visual C++

how do I set a value 开发者_开发问答of a textbox in Visual C++? I have been trying the following but the line strTemp.Format("%d", nNbr); does not compile thanks

        int nNbr = 5;
    CString strTemp;
    strTemp.Format("%d", nNbr);

    textBox.SetWindowTextW(strTemp);


You probably need to use the _T macro in order to support both ANSI and UNICODE builds of your application:

int nNbr = 5;
CString strTemp;
strTemp.Format(_T("%d"), nNbr);
textBox.SetWindowText(strTemp);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜