gizmo27
12th November 2009, 11:54
hi
I've created a push button and an editbox
purpose : to change value into the editbox by pushing the push button
first (after having declared before) I make my button and the editbox in the WM_CREATE :
hControle=CreateWindow(
"BUTTON",
"+",
WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,
10+290,10+165,
22,17,
fenetrePrincipale,
(HMENU)ID_PUSHBUTTON_3,
instance,
NULL);
(...)
weight = 720;
_stprintf(bufw, TEXT("%d"), weight);
hEdit=CreateWindow( "EDIT",
bufw,
WS_VISIBLE|WS_CHILD|WS_BORDER|ES_CENTER|ES_READONLY ,
10+248,10+172,40,20,fenetrePrincipale,(HMENU)ID_EDITBOX_3,instance,NULL);
=> second I call a function into the WM_COMMAND, function which contains this :UINT iId=LOWORD(wParam);
switch(iId)
{
case ID_PUSHBUTTON_3:
weight = weight + 1;
_stprintf(bufw, TEXT("%d"), weight);
break;
}
The matter is that the editbox doesn't show the value I want : it's always '720' inside the editbox
thanks for telling me.
I've created a push button and an editbox
purpose : to change value into the editbox by pushing the push button
first (after having declared before) I make my button and the editbox in the WM_CREATE :
hControle=CreateWindow(
"BUTTON",
"+",
WS_CHILD|WS_VISIBLE|BS_PUSHBUTTON,
10+290,10+165,
22,17,
fenetrePrincipale,
(HMENU)ID_PUSHBUTTON_3,
instance,
NULL);
(...)
weight = 720;
_stprintf(bufw, TEXT("%d"), weight);
hEdit=CreateWindow( "EDIT",
bufw,
WS_VISIBLE|WS_CHILD|WS_BORDER|ES_CENTER|ES_READONLY ,
10+248,10+172,40,20,fenetrePrincipale,(HMENU)ID_EDITBOX_3,instance,NULL);
=> second I call a function into the WM_COMMAND, function which contains this :UINT iId=LOWORD(wParam);
switch(iId)
{
case ID_PUSHBUTTON_3:
weight = weight + 1;
_stprintf(bufw, TEXT("%d"), weight);
break;
}
The matter is that the editbox doesn't show the value I want : it's always '720' inside the editbox
thanks for telling me.