Simple WinAPI code problem.
Well I'm new in WinAPI, and can't figure why this does not work.
All I want to do is write a number in the edit box, and press a button to make the number appear in a CTEXT just below it. (and if possible save the number into a variable).
Then there is the rest of the window code which has no problems.
BOOL CALLBACK DlgProc(HWND hwnd, UINT Message, WPARAM wParam, LPARAM lParam)
int var = GetDlgItemInt(hwnd, IDC_NUMBER, &Funciono, FALSE); //IDC_NUMBER is an EDIT box.
if( Funciono == TRUE )
SetDlgItemInt(hwnd, IDC_SHOWVAR, var, "-");//IDC_SHOWVAR is a CTEXT.
default: return FALSE;
The error jumps in the "BOOL" part, thanks for any help.