Author Topic: Where to get BIT() function  (Read 65 times)

0 Members and 1 Guest are viewing this topic.

Offline Chris Chancellor

  • Sr. Member
  • ****
  • Posts: 298
Where to get BIT() function
« on: December 12, 2018, 07:04:06 AM »
Hello Jose

in your PB Winapi includes  of  ListViewCtrl.inc ,
there is a function named as    ListView_GetCheckState()  and it contains a BIT()  function

i dug through internet and MSDN and couldn't  find an equivalent BIT()  function

where can i get this function ?   as  i need this function to translate a PB program to O2

i need help please

Code: [Select]
' ========================================================================================
' Determines if an item in a list-view control is selected. This should be used only for
' list-view controls that have the LVS_EX_CHECKBOXES style.
' ========================================================================================
FUNCTION ListView_GetCheckState (BYVAL hwndLV AS DWORD, BYVAL i AS LONG) AS DWORD
   LOCAL nCheck AS LONG
   nCheck = SendMessage(hwndLV, %LVM_GETITEMSTATE, i, %LVIS_STATEIMAGEMASK)
   FUNCTION = BIT(nCheck, 12) - 1
END FUNCTION

Offline Chris Chancellor

  • Sr. Member
  • ****
  • Posts: 298
Re: Where to get BIT() function
« Reply #1 on: December 12, 2018, 07:18:00 AM »
Found that it is actually a PB function and not a  winapi function