Hi Frank,
To control a set of buttons you will need to capture the handles into an array, so you can use the id later during WM_COMMAND to retrieve a button handle.
static sys hchw[0x200]
...
hchw[id]=CreateWindowEx(0,strptr stys, s, style, px,py,lx,ly, hwnd, id, inst, null)
...
...
case WM_COMMAND
id=wparam and 0xffff
if id>0x100 and id<0x200 then
SetWindowText hchw[id], strptr ...
SetFocus hwnd
end if
'return 0
Equates are fixed at compile time. So the best thing to do is turn Buttoni into a variable
sys Buttoni=100
Then you will be able to increment it.