kiss_sdo 發表於 2018-8-8 16:19:46

VC++編輯框內容到變量


textBox1

DWORD God = 0;   

textBox1內容賦值到God  怎麽寫

yutsaihsieh 發表於 2018-8-8 16:39:55

你是要在textBox1中打地址嗎?

kiss_sdo 發表於 2018-8-8 16:55:17

yutsaihsieh 發表於 2018-8-8 16:39 static/image/common/back.gif
你是要在textBox1中打地址嗎?

不是地址,是輸入數字

yutsaihsieh 發表於 2018-8-8 16:59:47

那為什麼不用int或long之類的

kiss_sdo 發表於 2018-8-8 19:00:01

yutsaihsieh 發表於 2018-8-8 16:59 static/image/common/back.gif
那為什麼不用int或long之類的

textBox1.沒有Text成員 怎麽賦值到God這個全局變量呢

yutsaihsieh 發表於 2018-8-8 19:54:36

是textBox1->Text

yutsaihsieh 發表於 2018-8-8 19:55:13

然後要convert string to int

kiss_sdo 發表於 2018-8-8 22:15:22

yutsaihsieh 發表於 2018-8-8 19:55 static/image/common/back.gif
然後要convert string to int

DWORD AutoLRRange = textBox1->Text

這樣雖然不正確.但是想要的就是這種的效果

大佬我小白不會寫.能教下不勝感激.

yutsaihsieh 發表於 2018-8-8 22:22:13

String ^asd;
        asd=this->textBox1->Text;
        AutoLRRange=Convert::ToInt32(asd);
頁: [1]
查看完整版本: VC++編輯框內容到變量