• Welcome to Powerbasic Museum 2020-B.
 

News:

Forum in repository mode. No new members allowed.

Main Menu

Where to get BIT() function

Started by Chris Chancellor, December 12, 2018, 07:04:06 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

Chris Chancellor

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


' ========================================================================================
' 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

Chris Chancellor

Found that it is actually a PB function and not a  winapi function