Click here to Skip to main content
12,401,984 members (59,821 online)

Managed C++/CLI

 
QuestionCurrently i am abel to capture the 24-bit screens capturerin. Pin
lucky_122129-Oct-12 1:09
memberlucky_122129-Oct-12 1:09 
QuestionCurrently I am using the log4cplu 1.0.2 version, Now i want to use the 1.1.0 version. Pin
lucky_122126-Oct-12 2:15
memberlucky_122126-Oct-12 2:15 
AnswerRe: Currently I am using the log4cplu 1.0.2 version, Now i want to use the 1.1.0 version. Pin
Richard MacCutchan26-Oct-12 3:12
mvpRichard MacCutchan26-Oct-12 3:12 
GeneralRe: Currently I am using the log4cplu 1.0.2 version, Now i want to use the 1.1.0 version. Pin
lucky_122127-Oct-12 0:52
memberlucky_122127-Oct-12 0:52 
GeneralRe: Currently I am using the log4cplu 1.0.2 version, Now i want to use the 1.1.0 version. Pin
Richard MacCutchan27-Oct-12 3:11
mvpRichard MacCutchan27-Oct-12 3:11 
Questionexceptions Pin
Emmos201116-Oct-12 5:10
memberEmmos201116-Oct-12 5:10 
AnswerRe: exceptions Pin
Richard MacCutchan16-Oct-12 8:22
mvpRichard MacCutchan16-Oct-12 8:22 
Questionc++/cli define new explicit implementation of a sealed method Pin
Marius Bancila10-Oct-12 23:21
memberMarius Bancila10-Oct-12 23:21 
Let's say I have this code:

interface class IFoo
{
public:
   void foo();
};
 
ref class FooBase : public IFoo
{
public:
   virtual void foo() sealed = IFoo::foo
   {
   }
};

I need to define a new explicit foo() in a derived class, that overrides the sealed method in the base class. How do I do that? I tried a lot of things and none compiled.

ref class FooDerived : public FooBase
{
public:
   virtual void foo()
   {
   }
};

results in

error C4485: 'FooDerived::foo' : matches base ref class method 'FooBase::foo', but is not marked 'new' or 'override'; 'new' (and 'virtual') is assumed
1> .\Dlg.cpp(22) : see declaration of 'FooBase::foo'
1> Specify 'override' (and 'virtual') to override the ref class virtual method
1> Specify 'new' (and 'virtual') to hide the ref class virtual method with a new virtual method
1> Position for 'new' and 'override' keywords is after method parameter list

but if I add new

ref class FooDerived : public FooBase
{
public:
   virtual void foo() new
   {
   }
};

I get

Dlg.cpp(30) : error C2059: syntax error : 'string'
Dlg.cpp(31) : error C2091: function returns function

also

ref class FooDerived : public FooBase
{
public:
   virtual void foo() new = FooBase::foo
   {
   }
};

results in

1>.\Dlg.cpp(30) : error C2059: syntax error : 'string'
1>.\Dlg.cpp(30) : error C2091: function returns function
1>.\Dlg.cpp(31) : warning C4569: 'FooBase::foo' : no members match the signature of the explicit override
1>.\Dlg.cpp(31) : error C3671: 'FooDerived::foo' : function does not override 'FooBase::foo'

and

ref class FooDerived : public FooBase, public IFoo
{
public:
   virtual void foo() new = IFoo::foo
   {
   }
};

generates

1>.\Dlg.cpp(30) : error C2059: syntax error : 'string'
1>.\Dlg.cpp(30) : error C2091: function returns function
1>.\Dlg.cpp(31) : warning C4569: 'IFoo::foo' : no members match the signature of the explicit override
1>.\Dlg.cpp(31) : error C3671: 'FooDerived::foo' : function does not override 'IFoo::foo'

What I'm trying to do is overriding HwndSource.System.Windows.Interop.IKeyboardInputSink.TabInto[^]

Any help is appreciated.
AnswerRe: c++/cli define new explicit implementation of a sealed method Pin
John Schroedl11-Oct-12 3:19
memberJohn Schroedl11-Oct-12 3:19 
GeneralRe: c++/cli define new explicit implementation of a sealed method Pin
John Schroedl11-Oct-12 3:29
memberJohn Schroedl11-Oct-12 3:29 
GeneralRe: c++/cli define new explicit implementation of a sealed method Pin
Marius Bancila11-Oct-12 10:12
memberMarius Bancila11-Oct-12 10:12 
GeneralRe: c++/cli define new explicit implementation of a sealed method Pin
John Schroedl12-Oct-12 2:29
memberJohn Schroedl12-Oct-12 2:29 
GeneralRe: c++/cli define new explicit implementation of a sealed method Pin
Marius Bancila11-Oct-12 21:35
memberMarius Bancila11-Oct-12 21:35 
GeneralRe: c++/cli define new explicit implementation of a sealed method Pin
John Schroedl12-Oct-12 2:34
memberJohn Schroedl12-Oct-12 2:34 
GeneralRe: c++/cli define new explicit implementation of a sealed method Pin
John Schroedl12-Oct-12 2:38
memberJohn Schroedl12-Oct-12 2:38 
Questionhow can we avoid error D8016 ? Pin
litu kumar8-Oct-12 23:18
memberlitu kumar8-Oct-12 23:18 
AnswerRe: how can we avoid error D8016 ? Pin
Richard MacCutchan9-Oct-12 0:18
mvpRichard MacCutchan9-Oct-12 0:18 
GeneralRe: how can we avoid error D8016 ? Pin
litu kumar7-Nov-12 21:49
memberlitu kumar7-Nov-12 21:49 
GeneralRe: how can we avoid error D8016 ? Pin
Freak3026-Nov-12 3:11
memberFreak3026-Nov-12 3:11 
QuestionChild dialog shadow remains Pin
shivareaj5-Oct-12 7:30
membershivareaj5-Oct-12 7:30 
AnswerRe: Child dialog shadow remains Pin
Richard MacCutchan5-Oct-12 22:35
mvpRichard MacCutchan5-Oct-12 22:35 
GeneralRe: Child dialog shadow remains Pin
shivareaj6-Oct-12 6:02
membershivareaj6-Oct-12 6:02 
GeneralRe: Child dialog shadow remains Pin
Richard MacCutchan6-Oct-12 6:07
mvpRichard MacCutchan6-Oct-12 6:07 
GeneralRe: Child dialog shadow remains Pin
shivareaj6-Oct-12 17:55
membershivareaj6-Oct-12 17:55 
GeneralRe: Child dialog shadow remains Pin
Richard MacCutchan6-Oct-12 21:30
mvpRichard MacCutchan6-Oct-12 21:30 

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.


Advertise | Privacy | Mobile
Web01 | 2.8.160721.1 | Last Updated 19 Jul 2016
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid