- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page