Hi Guys.
I'm not a c++ dev but a VB.NET developer. I will first explain my scenario so that the question would be clear. Suppose I had a form which has a Label contro named label1 and the project name is Test which is done in a Visual Studio using the CLR template.
Files
I will just mention files which are related to the question only.
1) Form1.h
2) Test.cpp
Now I have functions (Tasks which the application should perform) on Test.cpp. My question is how do I update a label1 control within Test.cpp file inside the function.
Sample functions:
HRESULT Register(void)
{
//...
//Registration process here
//...
//Use the result to detemine the registration result and write the result in a label1 control
}
My question is how can I call the label1 within the cpp file. I've seen some posts says you will need to make another Form1 instance within the function or cpp file and yes doing so I am able to call the label but it seems as if I'm calling it to this new instance which doesn't really write/update the actual label on Form1.
Another question is with the HWND of a form. Can I be able to get the window handle before the window is created?
Thanks again as I've said I'm not a C++ dev.