|
Updating textbox from outside header in Visual C++
Hi there,
This is probably a really easy one, but I am new to Visual C++ and totally stuck.
What I am trying to do, upon a button click in a form, is to call a function in my .cpp file which at certain times is required to update a rich text box on the form. All runs fine except for the text updating. I have tried many ways to do this, calling the appendText function with my string direct from the .cpp file, or calling a function I have written called set_text which I have defined inside the form. If I call set_text from inside the form direct from a button click, it updates the text box, if however I call it from the .cpp file, it runs, but doesn't update the text (appears to run the same code though). Can someone give me an easy example of any way to append the richtextbox, as I do not wish to write my entire programme inside the class form1, as this seems very bad practice.
Any help very much appreciated
|