myWebClient->DownloadProgressChanged += gcnew DownloadProgressChangedEventHandler(&Form1::DownloadProgressCallback);
给出了错误:如何让事件处理程序访问成员数据?
1>.\Form1.cpp(26) : error C3352: 'void Form1::DownloadProgressCallback(System::Object ^,System::Net::DownloadProgressChangedEventArgs ^)' : the specified function does not match the delegate type 'void (System::Object ^,System::Net::DownloadProgressChangedEventArgs ^)'
文档使用静态非成员函数,因为这代表参数,但我想更新Form1
类的进度条成员。我在这里做错了什么?
我使用的是.NET 2.0,所以请尽可能使用语言。