HB_FUNC() : wParam, lParam = 0,0 for Macro

HB_FUNC() : wParam, lParam = 0,0 for Macro

Postby Jimmy » 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: Select all  Expand view
  hb_retni( ListView_GetSelectedCount(hWnd,0,0)

but it fail when compile ... hm

it work when use only
Code: Select all  Expand view
  hb_retni( ListView_GetSelectedCount(hWnd)

how is this possible :?:
greeting,
Jimmy
User avatar
Jimmy
 
Posts: 1585
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany


Re: HB_FUNC() : wParam, lParam = 0,0 for Macro

Postby Jimmy » Sun Nov 06, 2022 1: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: Select all  Expand view
  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
User avatar
Jimmy
 
Posts: 1585
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany

Re: HB_FUNC() : wParam, lParam = 0,0 for Macro

Postby Enrico Maria Giordano » Sun Nov 06, 2022 1:56 pm

Jimmy wrote:
Code: Select all  Expand view
  SendMessage ( hWnd, LVM_*, (WPARAM) x, (LPARAM) y)


This is not tied to a particular compiler, this is the normal C cast (conversion to type).
User avatar
Enrico Maria Giordano
 
Posts: 8315
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia

Re: HB_FUNC() : wParam, lParam = 0,0 for Macro

Postby Jimmy » Sun Nov 06, 2022 2: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
User avatar
Jimmy
 
Posts: 1585
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany



Return to FiveWin for Harbour/xHarbour

Who is online

Users browsing this forum: No registered users and 74 guests

cron