Author Topic: button+grid test  (Read 1715 times)

0 Members and 1 Guest are viewing this topic.

Frankolinox

  • Guest
button+grid test
« on: June 20, 2013, 08:23:51 AM »
lalala :)
« Last Edit: October 01, 2014, 08:27:01 AM by Frankolinox »

Charles Pegge

  • Guest
Re: button+grid test
« Reply #1 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.