問題描述

1.png 

2.png 

解決"無法加入成員變數至具有ID IDC_STATIC的控制項" Visual C++ 2015

如下面寫的,把IDC_STATIC改名就可以了。


https://social.msdn.microsoft.com/Forums/vstudio/e...

What error did you get?   What is the type of mLabel?  

First, right click on the static control and select 'Properties.'  If the control ID is IDC_STATIC you must edit it so it has a unique value, like IDC_MY_LABEL.

mLabel should be created by right clicking on the static control in the dialog editor and selecting 'Add Variable',  then selecting 'Control Variable'. The result will be a dialog member variable CStatic mLabel.  mLabel.SetWindowText should then work.

創作者介紹
創作者 mybeauty 的頭像
mybeauty

只是記事本

mybeauty 發表在 痞客邦 留言(0) 人氣()