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

Post Reply
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

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

Post by Jimmy »

hi,

i try to use wParam, lParam = 0,0 as descript here
https://learn.microsoft.com/en-us/windo ... ectedcount
wParam
Must be zero.
lParam
Must be zero.

Code: Select all | Expand

   hb_retni( ListView_GetSelectedCount(hWnd,0,0)
but it fail when compile ... hm

it work when use only

Code: Select all | Expand

   hb_retni( ListView_GetSelectedCount(hWnd)
how is this possible :?:
greeting,
Jimmy
User avatar
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

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

Post by Jimmy »

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

   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
Enrico Maria Giordano
Posts: 8753
Joined: Thu Oct 06, 2005 8:17 pm
Location: Roma - Italia
Has thanked: 1 time
Been thanked: 3 times
Contact:

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

Post by Enrico Maria Giordano »

Jimmy wrote:

Code: Select all | Expand

   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
Jimmy
Posts: 1740
Joined: Thu Sep 05, 2019 5:32 am
Location: Hamburg, Germany
Has thanked: 2 times

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

Post by Jimmy »

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
Post Reply