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

Managed C++/CLI

 
GeneralRe: Another DataGridView Question Pin
Luc Pattyn27-Sep-07 13:19
sitebuilderLuc Pattyn27-Sep-07 13:19 
GeneralRe: Another DataGridView Question Pin
BuckBrown28-Sep-07 6:02
BuckBrown28-Sep-07 6:02 
GeneralRe: Another DataGridView Question Pin
George L. Jackson28-Sep-07 10:23
George L. Jackson28-Sep-07 10:23 
GeneralRe: Another DataGridView Question Pin
BuckBrown28-Sep-07 10:34
BuckBrown28-Sep-07 10:34 
QuestionHow do you call a Parent Function from Child Form Pin
BuckBrown27-Sep-07 5:42
BuckBrown27-Sep-07 5:42 
AnswerRe: How do you call a Parent Function from Child Form Pin
BuckBrown27-Sep-07 11:33
BuckBrown27-Sep-07 11:33 
GeneralRe: How do you call a Parent Function from Child Form Pin
Rocky#27-Sep-07 18:18
Rocky#27-Sep-07 18:18 
GeneralRe: How do you call a Parent Function from Child Form Pin
BuckBrown28-Sep-07 7:21
BuckBrown28-Sep-07 7:21 
Hi Rocky,

I,m having some problems with this because all of the examples and documentation I have found show a delegate and a single class used from main(). I'm having a problem with a circular definition.

//-----This is in Class1.h------

#include "Class2.h"

delegate void MyDelegate();

public ref class Class1 : public System::Windows::Forms::Form
{
private: void UpdateFile()
{
// Body of Method
}

private: System::Void buttonAdvanced_Click(System::Object^ sender, System::EventArgs^ e)
{
Class2^ myclass2 = gcnew Class2();
myclass2->ShowDialog();
}
};

//-----This is in Class2.h------

#include "Class1.h" // I CAN"T DO THIS. THIS CLASS IS ALREADY INCLUDED IN Class1.h

public ref class Class2 : public System::Windows::Forms::Form
{
private: System::Void buttonUpdateFile_Click(System::Object^ sender, System::EventArgs^ e)
{
Class1^ myclass1 = gcnew Class1();
MyDelegate^ update_file = gcnew MyDelegate(myclass1, &Class1::UpdateFile);
}
};

The problem here is that I can't define MyDelegate^ update_file unless I #include Class1.h but class1.h already is #including Class2.h so the Class2 Form can be displayed, thus creating a circular dependancy. I haven't found any documentation on how to do what I am trying to do.

Thanks

Buck
QuestionConverting double, float, byte, short, string int values to void* Pin
dreamz648027-Sep-07 3:19
dreamz648027-Sep-07 3:19 
AnswerRe: Converting double, float, byte, short, string int values to void* Pin
led mike27-Sep-07 4:41
led mike27-Sep-07 4:41 
AnswerRe: Converting double, float, byte, short, string int values to void* Pin
Luc Pattyn28-Sep-07 7:49
sitebuilderLuc Pattyn28-Sep-07 7:49 
QuestionHow to change the change the startup type of a Windows Service from a program? Pin
Rocky#26-Sep-07 20:46
Rocky#26-Sep-07 20:46 
AnswerRe: How to change the change the startup type of a Windows Service from a program? Pin
led mike27-Sep-07 4:35
led mike27-Sep-07 4:35 
GeneralRe: How to change the change the startup type of a Windows Service from a program? Pin
Rocky#27-Sep-07 18:01
Rocky#27-Sep-07 18:01 
AnswerRe: How to change the change the startup type of a Windows Service from a program? Pin
Mark Salsbery27-Sep-07 6:10
Mark Salsbery27-Sep-07 6:10 
GeneralRe: How to change the change the startup type of a Windows Service from a program? Pin
Rocky#27-Sep-07 18:05
Rocky#27-Sep-07 18:05 
GeneralRe: How to change the change the startup type of a Windows Service from a program? Pin
Mark Salsbery28-Sep-07 6:37
Mark Salsbery28-Sep-07 6:37 
QuestionHow to remove an ambiguity in namespace in .NET 1.1 Pin
Rocky#26-Sep-07 19:17
Rocky#26-Sep-07 19:17 
AnswerRe: How to remove an ambiguity in namespace in .NET 1.1 Pin
DanB198329-Sep-07 10:29
DanB198329-Sep-07 10:29 
GeneralRe: How to remove an ambiguity in namespace in .NET 1.1 Pin
Rocky#30-Sep-07 0:04
Rocky#30-Sep-07 0:04 
GeneralRe: How to remove an ambiguity in namespace in .NET 1.1 Pin
DanB198330-Sep-07 9:16
DanB198330-Sep-07 9:16 
QuestionPassing a list of structures from managed c++ to c# Pin
slkr17126-Sep-07 2:42
slkr17126-Sep-07 2:42 
AnswerRe: Passing a list of structures from managed c++ to c# Pin
led mike26-Sep-07 4:55
led mike26-Sep-07 4:55 
GeneralRe: Passing a list of structures from managed c++ to c# Pin
slkr17126-Sep-07 20:55
slkr17126-Sep-07 20:55 
Questionusing unmanaged dlls asserts Pin
dedil26-Sep-07 1:13
dedil26-Sep-07 1:13 

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.