ถามเรื่อง VC++ หน่อยครับ

Started by ozuke, April 06, 2013, 11:21:34 AM

Previous topic - Next topic

ozuke

คือผมสร้าง static function ขึ้นแต่ทำไมมันไม่สามารถใช้งานคำสั่งของ component
พวก TextBox ListBox ได้ครับ มันจะขึ้น error แบบนี้ตลอดเลยครับ

error C2227: left of '->Text' must point to class/struct/union/generic type

โค้ดที่เขียน ได้เขียนแบบนี้ครับ

static void DataReceivedHandler(Object^ sender,SerialDataReceivedEventArgs^ e) {
SerialPort^ sp = (SerialPort^)sender;
&MainForm::ReceiveText->Text+=sp->ReadExisting();
}



https://docs.google.com/file/d/0B9HppoQOVif0ODU0aGlHMWpVQVE/edit?usp=sharing
ไฟล์แนบครับเป็นโปรเจ็ค ผมแค่อยากเขียน Visual C++ 2008 ให้มันติดต่อกับ Serial Port ได้หน่ะครับ
ขอบคุณครับ ;D


ozuke

ของผมมันขึ้นแบบนี้หน่ะครับ
รบกวนอีกทีครับ