#include "form.h" problem

Please support our C++ advertiser: Intel Parallel Studio Home
Reply

Join Date: Feb 2008
Posts: 517
Reputation: Jennifer84 is an unknown quantity at this point 
Solved Threads: 1
Jennifer84 Jennifer84 is offline Offline
Posting Pro

#include "form.h" problem

 
0
  #1
Nov 5th, 2008
I am encounter a problem that I dont understand what is happening.

I use the Form application where I from Form4 will open Form22 like this wich works.

  1. #pragma once
  2. #include "stdafx.h"
  3. #include "Form22.h"
  4.  
  5. Form22 ^form22 = gcnew Form22;
  6. form22->ShowDialog();


What I need to do now is to #include "Form4.h" in Form22 like this:
  1. #pragma once
  2. #include "stdafx.h"
  3. #include "Form4.h"

I also tried this in Form22:
  1. #pragma once
  2. #include "stdafx.h"
  3.  
  4. #ifndef FORM4_H
  5. #define FORM4_H
  6. #include "Form4.h"
  7. #endif

But if I try to #include "Form4.h" in Form22, I will have a compileError that says this. So I dont know why this is happening and what I can do about it.

'Form22' : undeclared identifier
'form22' : undeclared identifier
Last edited by Jennifer84; Nov 5th, 2008 at 6:40 pm.
Reply With Quote Quick reply to this message  
Join Date: Feb 2008
Posts: 517
Reputation: Jennifer84 is an unknown quantity at this point 
Solved Threads: 1
Jennifer84 Jennifer84 is offline Offline
Posting Pro

Re: #include "form.h" problem

 
0
  #2
Nov 6th, 2008
My actual case is that I need to know how it is possible to pass a "string" from Form22 to Form4.

The test I could think of could be:

Lets say that Form22 has a textBox1 that has the string "Hello".
Then when pressing the button "OK" that will close the Form22,
then Form4 will show a MessageBox with "Hello".

Within a Form I know how to do this but many get stuck when doing
this through forms.
So I wonder how I will begin this ?

Thank you
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:




Views: 500 | Replies: 1
Thread Tools Search this Thread



Tag cloud for C++
About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC