Hi all,

I am making the transition from console apps to GUIs, and have managed to create a windowed application which opens a dialog with a two text inpit spaces and an 'add' button plus a Listbox intended to show the result of an addition of the two previously entered numbers. Here is the code I have for the addition sun when 'add' is pressed:

Code:
case IDC_ADD: //Pressing the 'add' button.
{
BOOL bSuccess;
int first = GetDlgItemInt(hwnd, IDC_TEXT, &bSuccess, FALSE); //Getting number from first box.
int second = GetDlgItemInt(hwnd, IDC_TEXT2, &bSuccess, FALSE); //Getting number from second box.
int result = first + second; //Adding those together.
break;
}
Now, how to I get the result to be applied to the Listbox?

Thanks.