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

Managed C++/CLI

 
QuestionRe: Problems wih bit shifting function Pin
Mark Salsbery9-May-07 9:26
Mark Salsbery9-May-07 9:26 
AnswerRe: Problems wih bit shifting function Pin
led mike9-May-07 9:40
led mike9-May-07 9:40 
GeneralRe: Problems wih bit shifting function Pin
Mark Salsbery9-May-07 9:45
Mark Salsbery9-May-07 9:45 
Questionsave in c++ Pin
lavy28839-May-07 6:36
lavy28839-May-07 6:36 
AnswerRe: save in c++ Pin
Christian Graus10-May-07 15:42
protectorChristian Graus10-May-07 15:42 
QuestionWild number problem Pin
hasan_hasany8-May-07 18:29
hasan_hasany8-May-07 18:29 
AnswerRe: Wild number problem Pin
Christian Graus8-May-07 18:33
protectorChristian Graus8-May-07 18:33 
QuestionC2039 :Is not a member of 'System::Windows::Forms::Form' Pin
tcompter8-May-07 10:57
tcompter8-May-07 10:57 
I have a windows form based application, which creates an instance of another class, to which it passes a pointer to itself in the constructor as 'this'. The form has a couple of __property methods, and I'm trying to get the other class to use those methods to push some data back up to the parent form.

For example, let's say my Form1 has a method:
__property void set_MyNumber(int theNumber) {mynumber = theNumber;}

Form1 instantiates another class:
myThing = new CmyOtherClass(this);

Now, down in the other class, I try to access the properties like this:
myParent->MyNumber = 3;

What I get is the following error:
error C2039: 'MyNumber' : is not a member of 'System::Windows::Forms::Form'
I'm fairly sure that the pointers are right, because the following code works fine:
MessageBox::Show(myParent->Width.ToString());

However, it just doesn't seem to recognize the properties I created in the Form1 class. Is there some header or include or using thing that I need to add to make the properties work?

To broaden the question a bit, is this totally the wrong approach? I thought perhaps using delegates might be a better answer, but I seemed to run into similar problems with them as well.

What is the best way to pass information from a subordinate object to its parent?

Thanks for any insight.

_________
. | homas

AnswerRe: C2039 :Is not a member of 'System::Windows::Forms::Form' Pin
Mark Salsbery8-May-07 11:02
Mark Salsbery8-May-07 11:02 
GeneralRe: C2039 :Is not a member of 'System::Windows::Forms::Form' Pin
tcompter8-May-07 11:30
tcompter8-May-07 11:30 
GeneralRe: C2039 :Is not a member of 'System::Windows::Forms::Form' Pin
Mark Salsbery8-May-07 11:34
Mark Salsbery8-May-07 11:34 
GeneralRe: C2039 :Is not a member of 'System::Windows::Forms::Form' Pin
tcompter9-May-07 10:34
tcompter9-May-07 10:34 
GeneralRequest Pin
KeeperMustDie8-May-07 9:55
KeeperMustDie8-May-07 9:55 
GeneralRe: Request Pin
Mark Salsbery8-May-07 10:39
Mark Salsbery8-May-07 10:39 
QuestionAcceptButton in Dialog Box doesn't appear to work Pin
BuckBrown8-May-07 8:22
BuckBrown8-May-07 8:22 
AnswerRe: AcceptButton in Dialog Box doesn't appear to work Pin
BuckBrown8-May-07 9:49
BuckBrown8-May-07 9:49 
QuestionSelecting specific radio button Pin
BuckBrown7-May-07 10:52
BuckBrown7-May-07 10:52 
AnswerRe: Selecting specific radio button Pin
BuckBrown7-May-07 11:06
BuckBrown7-May-07 11:06 
Questionasking for sort linklist Pin
Arif Liminto7-May-07 6:05
professionalArif Liminto7-May-07 6:05 
AnswerRe: asking for sort linklist Pin
Christian Graus7-May-07 13:09
protectorChristian Graus7-May-07 13:09 
QuestionC2065 error Pin
subramanyeswari7-May-07 2:12
subramanyeswari7-May-07 2:12 
AnswerRe: C2065 error Pin
prasad_som7-May-07 4:21
prasad_som7-May-07 4:21 
Questionhow to convert the string type into double type? (vs 2005) Pin
sync_austin6-May-07 23:41
sync_austin6-May-07 23:41 
AnswerRe: how to convert the string type into double type? (vs 2005) Pin
prasad_som6-May-07 23:46
prasad_som6-May-07 23:46 
GeneralRe: how to convert the string type into double type? (vs 2005) Pin
sync_austin7-May-07 0:18
sync_austin7-May-07 0:18 

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.