Windows Form and Printing to a text box

May 16, 2012 at 2:21pm
I'm working on a simple windows application using Visual Studio and I was wondering if there was a way I could have a button that, when pressed, would do some stuff and then have it print out stuff to a text box adjacent to the button?


Ex.

|------------------------|
|                        |
|  button                |  button does something, then prints stuff in text box
|     |                  |
|      \                 |
|       -->   text box   |
|                        |
|------------------------|
Last edited on May 16, 2012 at 2:23pm
May 16, 2012 at 2:31pm
Of course. Simply have the button call SendMessage() with the HWND of the textbox and the WM_SETTEXT message.
May 16, 2012 at 3:04pm
What's the "HWND"and "WM_SETTEXT"?
May 16, 2012 at 3:07pm
closed account (1vRz3TCk)
1
2
3
4
private: System::Void button1_Click(System::Object^  sender, System::EventArgs^  e) 
         {
             richTextBox1->Text = "Stuff";
         }
May 16, 2012 at 6:28pm
Tried something of that nature and its not working.
May 17, 2012 at 6:17am
That is a completly useles reply
May 17, 2012 at 7:17am
Nevermind. Figured it out.
Topic archived. No new replies allowed.