main.cpp, Form1.h and Text.h. The code for main.cpp is unaltered. Form1.h includes Text.h and has the following function call from Text.h in the richtextbox code section (note. the name of the richtextbox in Form1 is called RichTextBox1):
The following is the error statement: error C2653: 'Color' : is not a class or namespace name
error C2065: 'Red' : undeclared identifier
If the code line 'richtextbox->SelectionColor = Color::Red;' is placed after the insertText(RichTextBox1) in Form1.h, the program compiles without error.
My question:
How do I go about having 'richtextbox->SelectionColour = Color::Red' work in Text.h? That is, I want all text manipulation coming from Text.h with a single function call.