Click here to Skip to main content
       

VS 11 & .NET 4.5

 
You must Sign In to use this message board.
Search this forum  
    Spacing  Noise  Layout  Per page  Show 
GeneralRe: shortcut keysmemberMike Meinz16 Feb '13 - 4:08 
The shortcut key combinations listed in the Shortcut property ComboBox are the only ones available for you to use.
QuestionC++/Cx syntax errormemberSuper Lloyd14 Jan '13 - 2:47 
I have the following simple WinRT C++/Cx code involving inherited interface, template class and public implementation:
 
public interface class IFoo
{
    void KungFoo();
};
public interface class IBar : IFoo
{
    void Snafu();
};
 
template <class T>
ref class TFoo : IFoo
{
public:
    virtual void KungFoo() { std::cout << "TFoo.KungFoo(" << sizeof(T) << ")" << std::endl; }
};
template <class T>
ref class TBar : TFoo<int>, IBar
{
public:
    virtual void Snafu() { std::cout << "TBar.Snafu(" << sizeof(T) << ")" << std::endl; }
};
 
public ref class FooBar : IBar
{
private:
    TBar<USHORT> bar;
public:
    virtual void KungFoo() { bar.KungFoo(); }
    virtual void Snafu() { bar.Snafu(); }
};
When I try to compile that I got the error:
 
error C3766: 'TBar<T>' must provide an implementation for the interface method 'void IFoo::KungFoo(void)'
 
but : TBar<T> inherit from TFoo<int> which does implement the interface!!!
 
What is wrong? How to fix that please?
 
Thanks!
My programming get away... The Blog...
Taking over the world since 1371!

NewsProblem solvedmemberSuper Lloyd14 Jan '13 - 2:55 
template <class T>
ref class TBar : TFoo<int>, IBar
{
public:
    virtual void KungFoo() override { TFoo<int>::KungFoo(); }
    virtual void Snafu() { std::cout << "TBar.Snafu(" << sizeof(T) << ")" << std::endl; }
};
My programming get away... The Blog...
Taking over the world since 1371!

QuestionAdding form close eventmemberandrew charles21 Dec '12 - 20:28 
how to add a close click form events in form skinner
 
Regards
Andy
SuggestionRe: Adding form close eventmvpRichard MacCutchan21 Dec '12 - 23:07 
You need to provide considerably more detail on this if you expect a sensible answer. What language, platform, framework ... ?
One of these days I'm going to think of a really clever signature.

QuestionC++Cx / WinRT: Parameterized constructor (and operator overloading) for 'public value struct'memberSuper Lloyd20 Dec '12 - 2:08 
I have a C++/Cx class like so
public value struct float2
{
	float x,y;
};
I'd like to add a constructor with parameter like
public value struct float2
{
	float x,y;
	float2(float _x, float _y);
};
and I got a compiler error. Some googling later it seems it's not possible to add a constructor to a struct.. mm... fine I guess...
 
Then later I was looking at
public value class Windows::Foundation::Size,
 
And it has a parameterized constructor!!!
Windows::Foundation::Size::Size(float w, float h)!!!
 

This WinRT API value class has a public constructor with parameters!! (it even implement operator overloading!)
but The best I tried I couldn't implement paremeterized constructor and operator overloading for my own value struct.. Frown | :(
 
Can someone show me how to declare / implement a simple parameterized constructor (and operator overloading for '+') on my simple class above please?!!!!!!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.

AnswerRe: C++Cx / WinRT: Parameterized constructor (and operator overloading) for 'public value struct'memberSuper Lloyd20 Dec '12 - 18:50 
Apparently Microsoft cheated...
From the same questin on MSDN forums it seems that, yes MS did that, but I can't!
 
Just like you can't make non sealed public ref class.
Except if you inherit from DependencyObject!
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.

Questionvc++membersrinivasankrishnaa14 Dec '12 - 6:37 
can anyone help me how to create a onscreen keyboard using visual c++ please..........
AnswerRe: vc++memberSuper Lloyd14 Dec '12 - 20:11 
You can google on:
1. how to create a bordeless window in C++
2. how to draw in C++ with...
- GDI?
- GDI+?
- DirectX?
- Other?
take your pic!
3. How to handle mouse event
A train station is where the train stops. A bus station is where the bus stops. On my desk, I have a work station....
_________________________________________________________
My programs never have bugs, they just develop random features.

GeneralRe: vc++membersrinivasankrishnaa17 Dec '12 - 4:22 
can you help me how to make a on screen keyboard...

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


Advertise | Privacy | Mobile
Web03 | 2.6.130523.1 | Last Updated 23 May 2013
Copyright © CodeProject, 1999-2013
All Rights Reserved. Terms of Use
Layout: fixed | fluid