Oxygen Basic

Programming => Example Code => Topic started by: Frankolinox on June 20, 2013, 08:23:51 AM

Title: button+grid test
Post by: Frankolinox on June 20, 2013, 08:23:51 AM
lalala :)
Title: Re: button+grid test
Post by: Charles Pegge on June 20, 2013, 12:22:17 PM
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.