After a long gap, I’ve written another article for The Code Project.
The article is a simple introduction to using the CWinFormsControl MFC class to put a Windows Forms control on an MFC dialog.
Nish Nishant – Technology & Architecture Leader
Nish’s thoughts on technology leadership, cloud architecture, and APIs, among other things
After a long gap, I’ve written another article for The Code Project.
The article is a simple introduction to using the CWinFormsControl MFC class to put a Windows Forms control on an MFC dialog.
Hi Nishant,
Based on your example, I decided to try out MFC to .Net bridge and actually bought your book also. I have made some progress. However, I go stuck with the problem below for which I have not been able to find a solution. I have now bought your book on C++/CLI to seek further clues to the problem below. I will appreciate if you can provide further help.
Hi,
I have been testing out MFC to .NET connection. I have been through a number of hurdles. This one is
beyond me.
#pragma once
using namespace System;
using namespace System::ComponentModel;
#using
ref class CManagedClass1
{
public:
array^ MyArr;
// default indexer
[Category(“MyArrFIX”)]
property int default[int] {
int get(int index) {
return MyArr[index];
}
void set(int index, int value) {
MyArr[index] = value;
}
}
bool bCanStretch;
[Category(“Appearance”)]
property Boolean CanStretch
{
Boolean get() { return bCanStretch; }
void set(Boolean value)
{
bCanStretch = value;
}
}
enum class suit{clubs,diamonds,spade,hearts};
[Category(“MyPropertysuit”)]
property suit MyPropertysuit
{
void set( suit value )
{
}
suit MyPropertysuit::get()
{
// Getter code here:
return(suit::clubs);
}
}
CManagedClass1(void);
};
Out of 3 properties defined above, I do not know why property “MyArrFIX” DOES NOT WORK.
Am I missing something here.
Thanks in anticipation
We need to de-construct contemporary antisemitic discourse. ,