Back to main

 

Function 8 - define / delete button

Parameters for defining a button:

  * eax = 8 - function number

  * ebx = [x axis coordinate] * 65536 + [x axis size]

  * ecx = [y-coordinate] * 65536 + [y-axis size]

  * edx = 0xXYnnnnnn, where:

    * nnnnnn = button id

    * senior (31st) bit edx cleared

    * if the 30th bit of edx is set - do not draw a button

    * if the 29th bit of edx is set - do not draw a frame when pressing the button

  * esi = 0x00RRGGBB - button color

Parameters for deleting a button:

  * eax = 8 - function number

  * edx = 0x80nnnnnn, where nnnnnn is the button ID

Return value:

  * function does not return value

Remarks:

  * Button sizes must be greater than 0 and less than 0x8000.

  * For windows with a skin, when defining a window (calling the 0th function), two standard buttons are created - closing the window with identifier 1 and minimizing the window with identifier 0xffff.

  * Create two buttons with the same ID

    quite acceptable.

  * The button with the identifier 0xffff, when clicked, is interpreted by the system as the minimization button, the system processes such a pressure independently, without referring to the application. The rest is the usual button.

  * The total number of buttons for all applications is limited to 4095.

 

Constants for registers:

  eax - SF_DEFINE_BUTTON (8)