Win32(no offence intended to ZMan's fine mfc example):
Use GetDlgItemInt to return the numerical contents of an edit control (make sure the control has ES_NUMBER style to avoid confusion).
If you want to get the contents as a string then use GetDlgItemText.
or, using GetDlgItemText:
BOOL bSigned=FALSE; //TRUE if you want signed int only returned
Where, in both cases, hDlg is the handle of the parent wnd, IDC_NUM_EDIT is the id for the edit cntrl. The return value from GetDlgItemText is shown for demo purposes only; you can use it if you wish.
Hope that helps.