I am worikng on Windows programming
and wants to get the value of an editBox or text box defined as.

//EditBox is defined this way

hwndPrincipal = CreateWindow(
"EDIT", //name of windwo class
NULL,//title
WS_VISIBLE|WS_CHILD|WS_BORDER |ES_RIGHT|WS_TABSTOP,// WINDOW STYLE NORMAL
260,//x coordinate
90,//y co
155,//width
45,//height
hwnd,
NULL,
hThisInst, //instance handle
NULL //NO additional arguments
);

I am typing a number and want that number
to use it in a calulaton i tried the following but
did not work

//get the values from text boxes
//principal is decalred above as char principal[20]

GetWindowText(hwndPrincipal,principal,NULL);

//then calculate
computeNumber(principal);

I am not getting any error message but the result
i am getting is alway 0

any suggestion is appreciated