Y
Y
yuharu2015-10-21 19:07:31
C++ / C#
yuharu, 2015-10-21 19:07:31

How does a WIndows Form refer to a component in a .cpp file?

As usual, there is Form1.h and let's say Name.cpp.
How in the cpp file will refer to the form component, for example, how to implement label1->Text=""?
#include "Form1.h" is present.
At such input the compiler does not see. I'm new, so I don't know much.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
G
GavriKos, 2015-10-21
@GavriKos

You need not just an include, but also pass a pointer to this form to the function that calls. And take label1 from the pointer and so on.

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question