問題描述
解決"無法加入成員變數至具有ID IDC_STATIC的控制項" Visual C++ 2015
如下面寫的,把IDC_STATIC改名就可以了。
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.
全站熱搜