Hi All,
In Win32 this works well:
iret = SendMessage(hWndList,LVM_SETEXTENDEDLISTVIEWSTYLE,0, &
ior(LVS_EX_FULLROWSELECT,LVS_EX_ONECLICKACTIVATE))
But in x64 I get warnings about the arguments to IOR.
I solve the problem by using local declarations like this:
integer(8) LVS_EX_FULLROWSELECT_I8,LVS_EX_ONECLICKACTIVATE_I8
then local assignments like this:
LVS_EX_FULLROWSELECT_I8 = LVS_EX_FULLROWSELECT
LVS_EX_ONECLICKACTIVATE_I8 = LVS_EX_ONECLICKACTIVATE
and a call like this:
iret = SendMessage(hWndList,LVM_SETEXTENDEDLISTVIEWSTYLE,0, &
ior(LVS_EX_FULLROWSELECT_I8,LVS_EX_ONECLICKACTIVATE_I8))
It works, but it's ugly. Is there a better way?
Many thanks
Mike
連結已複製
integer(flparam) :: iflgs
ifgs = ior( LVS_EX_FULLROWSELECT, LVS_EX_ONECLICKACTIVATE )
iret = SendMessage(hWndList,LVM_SETEXTENDEDLISTVIEWSTYLE, 0_fwparam, iflgs )
or
integer :: iflgs
ifgs = ior( LVS_EX_FULLROWSELECT, LVS_EX_ONECLICKACTIVATE )
iret = SendMessage(hWndList,LVM_SETEXTENDEDLISTVIEWSTYLE, 0_fwparam, int(iflgs,flparam) )
I would tend to use one of the above but without my typo's
I'd do it this way:
iret = SendMessage(hWndList,LVM_SETEXTENDEDLISTVIEWSTYLE,0, &
iany([integer(fLPARAM)::LVS_EX_FULLROWSELECT,LVS_EX_ONECLICKACTIVATE]))
Note that this can be extended to as many values as needed to OR together.
