ENTER for TGrid From TControl
Posted: Wed Oct 19, 2022 5:40 am
hi,
i can use Method Notify() to get NM_CLICK but how when press ENTER of Listview
but it crash here
i "think" i got wrong nLParam from GetLParam(nPtrNMHDR) ..
so how to ENTER my CLASS TGrid
i can use Method Notify() to get NM_CLICK but how when press ENTER of Listview

Code: Select all | Expand
METHOD Notify( nIdCtrl, nPtrNMHDR ) CLASS TGrid
LOCAL nCode := GetNMHDRCode( nPtrNMHDR )
LOCAL nWParam := GetWParam( nPtrNMHDR )
LOCAL nLParam := GetLParam( nPtrNMHDR )
CASE nCode == LVN_KEYDOWN
if GETGRIDVKEY(nLParam) = 13
but it crash here

Code: Select all | Expand
HB_FUNC ( GETGRIDVKEY )
{
#ifndef _WIN64
LPARAM lParam = (LPARAM) hb_parnl (1);
#else
LPARAM lParam = (LPARAM) hb_parnll (1);
#endif
LV_KEYDOWN * LVK = (LV_KEYDOWN *) lParam;
hb_retni ( LVK->wVKey );
}
i "think" i got wrong nLParam from GetLParam(nPtrNMHDR) ..
so how to ENTER my CLASS TGrid
