Member Avatar

I want to set a value to a textbox from another class. I have tried to give the GUI as parameter to a function but I can reach it in a .h file, but not in my a .cpp file. Can somebody tell me how it is possible to set a value to a textbox from my .cpp file?

what kind of program do you have? win32 api or Windows Forms (which is c++/CLR, not c++ standard). There are hundreds of ways to do what you asked, post some code to show us what you are trying to do.

If your program is win32 api then function A() needs to pass function B() the HWND handle of the textbox, or function B() returns a pointer to a string to function A() so that A() can populate the textbox.