FiveTech Support Forums

FiveWin / Harbour / xBase community
Board index FiveWin for Harbour/xHarbour HB_FUNC() : wParam, lParam = 0,0 for Macro
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
HB_FUNC() : wParam, lParam = 0,0 for Macro
Posted: Sun Nov 06, 2022 12:12 PM
hi,

i try to use wParam, lParam = 0,0 as descript here
https://learn.microsoft.com/en-us/windows/win32/controls/lvm-getselectedcount
wParam
Must be zero.
lParam
Must be zero.
Code (fw): Select all Collapse
   hb_retni( ListView_GetSelectedCount(hWnd,0,0)
but it fail when compile ... hm

it work when use only
Code (fw): Select all Collapse
   hb_retni( ListView_GetSelectedCount(hWnd)
how is this possible :?:
greeting,

Jimmy
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: HB_FUNC() : wParam, lParam = 0,0 for Macro
Posted: Sun Nov 06, 2022 01:52 PM
Enrico Maria Giordano wrote:Because it is the correct macro prototype:
uuups ...

i have read Description from LVM_GETSELECTEDCOUNT Message not from ListView_GetSelectedCount Macro :roll:

---

in HMG Source i found some AVOID_COMPILER_WARNING when using Listview Macro
HMG use
Code (fw): Select all Collapse
   SendMessage ( hWnd, LVM_*, (WPARAM) x, (LPARAM) y)
instead which is like my Xbase++ Style using Ot4XB LIB

not sure if it belong to MinGW Compiler or also BCC / MSVC but it seems to work under Fivewin that Way
greeting,

Jimmy
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HB_FUNC() : wParam, lParam = 0,0 for Macro
Posted: Sun Nov 06, 2022 01:56 PM
Jimmy wrote:
Code (fw): Select all Collapse
   SendMessage ( hWnd, LVM_*, (WPARAM) x, (LPARAM) y)
This is not tied to a particular compiler, this is the normal C cast (conversion to type).
Posts: 1772
Joined: Thu Sep 05, 2019 05:32 AM
Re: HB_FUNC() : wParam, lParam = 0,0 for Macro
Posted: Sun Nov 06, 2022 02:18 PM
hi Enrico,
Enrico Maria Giordano wrote:This is not tied to a particular compiler, this is the normal C cast (conversion to type).
i talk about Macro which "might" make Problem so HMG use SendMessage() which also work under FiveWin BCC / MSVC
greeting,

Jimmy
Posts: 9020
Joined: Thu Oct 06, 2005 08:17 PM
Re: HB_FUNC() : wParam, lParam = 0,0 for Macro
Posted: Sun Nov 06, 2022 03:33 PM

Ah, ok.

Continue the discussion