int firstButton = IDC_BUTTON1;
for(int i = firstButton; i < firstButton + 16; ++i)
{
CWnd *pB = GetDlgItem(i);
for(int j = 0; j < 16; ++j)
{
pB->SetWindowTextW((LPCTSTR)(szTest[j]));
}
}
我想动态更改按钮标题。
当在 SetWindowTextW 中使用像“static txt”这样的静态文本时,它运行良好,
但使用 char 数组(在本例中为 szTest),标题不会更改
我编码了错误的类型转换吗?