Getting a button to perform a function
Ok so I've created a windows program, it has a main window and two child windows, one of which is a button. What I want to do is for the button to run a function, and then display the results of that funtion in the other child window. (It will be some text just)
So basically what I'm looking for help with is creating a window that can hold text, and a button that runs a function. I think I've worked out the how to get the button to run a function, but I'm unsure how to link it all up.
Code:
switch(msg)
{
case BN_CLICKED
function();
break;
I hope that including this in the message loop will get the button to run a function. But I just don't know how to make that function print text to the other window.