Click here to Skip to main content
15,889,116 members
Home / Discussions / Managed C++/CLI
   

Managed C++/CLI

 
GeneralRe: cast to c++ interface from C# Pin
Natty Gur14-Apr-03 4:48
Natty Gur14-Apr-03 4:48 
GeneralRe: cast to c++ interface from C# Pin
bwells14-Apr-03 13:58
bwells14-Apr-03 13:58 
GeneralRe: cast to c++ interface from C# Pin
Natty Gur14-Apr-03 17:34
Natty Gur14-Apr-03 17:34 
GeneralRe: cast to c++ interface from C# Pin
bwells16-Apr-03 12:57
bwells16-Apr-03 12:57 
GeneralRe: cast to c++ interface from C# Pin
Natty Gur16-Apr-03 20:11
Natty Gur16-Apr-03 20:11 
GeneralUnmanaged code to call managed code Pin
onyxbird10-Apr-03 9:43
onyxbird10-Apr-03 9:43 
GeneralRe: Unmanaged code to call managed code Pin
Paul Selormey10-Apr-03 18:03
Paul Selormey10-Apr-03 18:03 
GeneralC2682: cannot use __try_cast to convert from 'gcroot<T>' Pin
Paul Selormey31-Mar-03 20:40
Paul Selormey31-Mar-03 20:40 
Hello All,
I have a standard C++ class with MC++ member defined as
gcroot < System::Drawing::Brush __gc* > m_pDotNetBrush;

Somewhere in the codes, I wish to use the brush and trying to
cast it to the appropriate type:
System::Drawing::SolidBrush __gc* pBrush =
 __try_cast < System::Drawing::SolidBrush __gc* >(m_pDotNetBrush);

This, however, generates error in the form:
<br />
error C2682: cannot use __try_cast to convert from 'gcroot < T >' to 'System::Drawing::SolidBrush __gc *'<br />

I tried the other standard C++ casts and all failed with same error.
What is supposed to be done in this case?

Best regards,
Paul.


Jesus Christ is LOVE! Please tell somebody.
GeneralRe: C2682: cannot use __try_cast to convert from 'gcroot<T>' Pin
Paul Selormey1-Apr-03 0:51
Paul Selormey1-Apr-03 0:51 
GeneralMixing ATL and MC++ Pin
Heath Stewart26-Mar-03 3:17
protectorHeath Stewart26-Mar-03 3:17 
GeneralRe: Mixing ATL and MC++ Pin
Paul Selormey26-Mar-03 13:29
Paul Selormey26-Mar-03 13:29 
GeneralCovariant return types Pin
VizOne24-Mar-03 22:52
VizOne24-Mar-03 22:52 
GeneralRe: Covariant return types Pin
Paul Selormey26-Mar-03 0:41
Paul Selormey26-Mar-03 0:41 
GeneralRe: Covariant return types Pin
VizOne26-Mar-03 0:53
VizOne26-Mar-03 0:53 
GeneralRe: Covariant return types Pin
Paul Selormey26-Mar-03 1:12
Paul Selormey26-Mar-03 1:12 
GeneralRe: Covariant return types Pin
VizOne26-Mar-03 8:35
VizOne26-Mar-03 8:35 
GeneralRe: Covariant return types Pin
Paul Selormey26-Mar-03 13:22
Paul Selormey26-Mar-03 13:22 
GeneralRe: Covariant return types Pin
Daniel Turini14-Apr-03 0:52
Daniel Turini14-Apr-03 0:52 
GeneralRe: Covariant return types Pin
Paul Selormey26-Mar-03 19:05
Paul Selormey26-Mar-03 19:05 
GeneralSocket function error Pin
TeraCoder24-Mar-03 14:23
TeraCoder24-Mar-03 14:23 
GeneralRe: Socket function error Pin
Paul Selormey24-Mar-03 17:33
Paul Selormey24-Mar-03 17:33 
GeneralForm within Form ... Pin
Maximilien21-Mar-03 11:59
Maximilien21-Mar-03 11:59 
GeneralRe: Form within Form ... Pin
Paul Selormey24-Mar-03 17:30
Paul Selormey24-Mar-03 17:30 
GeneralDisplaying a dialog from a DLL Pin
Squatch618-Mar-03 17:04
Squatch618-Mar-03 17:04 
GeneralRe: Displaying a dialog from a DLL Pin
Paul Selormey18-Mar-03 18:21
Paul Selormey18-Mar-03 18:21 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.