DennisWoo
November 16th, 2005, 05:23 PM
Hi guys,
I am in the process of converting a VS2003 listview control to the new C++/CLI synatx. Here is the problem I have:
NMHDR *h = dynamic_cast<NMHDR*>( Marshal::PtrToStructure(msg->LParam, __typeof(NMHDR)) );
When I compiled it, it gives me 2 errors:
error C4980: '__typeof' : use of this keyword requires /clr:oldSyntax command line option
error C2440: 'dynamic_cast' : cannot convert from 'System::Object ^' to 'NsCtlListView::CtlListView::NMHDR *'
error C2664: 'void System::Windows::Forms::Control::WndProc(System::Windows::Forms::Message %)' : cannot convert parameter 1 from 'System::Windows::Forms::Message ^' to 'System::Windows::Forms::Message %'
I tried couple of things but I can't solve this problem.
Any suggestions please?
Thanks.
Dennis
I am in the process of converting a VS2003 listview control to the new C++/CLI synatx. Here is the problem I have:
NMHDR *h = dynamic_cast<NMHDR*>( Marshal::PtrToStructure(msg->LParam, __typeof(NMHDR)) );
When I compiled it, it gives me 2 errors:
error C4980: '__typeof' : use of this keyword requires /clr:oldSyntax command line option
error C2440: 'dynamic_cast' : cannot convert from 'System::Object ^' to 'NsCtlListView::CtlListView::NMHDR *'
error C2664: 'void System::Windows::Forms::Control::WndProc(System::Windows::Forms::Message %)' : cannot convert parameter 1 from 'System::Windows::Forms::Message ^' to 'System::Windows::Forms::Message %'
I tried couple of things but I can't solve this problem.
Any suggestions please?
Thanks.
Dennis