Home > database >  Pb11 SendMessageW for help
Pb11 SendMessageW for help

Time:09-18

Run the following code pb9 no problem, pb11 GetClientHwnd (lst_Client, lst_TC_ITEM lParam, 28) there was a problem, the reason is TabCtrl_GetItem (il_HWND, TCM_GETITEM, ai_tabIndex - 1, lst_TC_ITEM),
Lst_TC_ITEM lParam is 0, pb9 lst_TC_ITEM. LParam is value

The FUNCTION ulong TabCtrl_GetItem (ulong HWND, ulong wMsg, ulong wParam, ref st_TC_ITEM lParam) LIBRARY "user32. DLL" ALIAS FOR "SendMessageW
"The Function long GetClientHwnd (REF st_tcclient Destination, long the Source of long Size) library "kernel32. DLL" Alias For "RtlMoveMemory; ANSI
"

ULong ll_hImageList ll_ImageIndex, ll_IconHandle
ULong ll_width, ll_height
St_TC_ITEM lst_TC_ITEM

IF ai_tabIndex & lt; 1 THEN
RETURN 0
END the IF

Ll_hImageList=Send (il_HWND TCM_GETIMAGELIST, 0, 0)

Lst_TC_ITEM. Mask=TCIF_IMAGE + TCIF_TEXT + TCIF_PARAM

Lst_TC_ITEM. Psztext=LocalAlloc (0255)
Lst_TC_ITEM. Cchtextmax=255
Lst_TC_ITEM. LParam=123
TabCtrl_GetItem (il_HWND, TCM_GETITEM, ai_tabIndex 1, Lst_TC_ITEM)
Ist_TabPages [ai_tabindex] TabText=String (lst_TC_ITEM psztext, 'address')
LocalFree (lst_TC_ITEM psztext)
Ll_ImageIndex=lst_TC_ITEM. IImage

IF ll_ImageIndex & gt;=0 THEN
Ll_IconHandle=ImageList_GetIcon (ll_hImageList ll_ImageIndex, 1)
ImageList_GetIconSize (ll_hImageList ll_width, ll_height)
END the IF

Ist_TabPages [ai_tabindex] ImageHandle=ll_IconHandle
Ist_TabPages [ai_tabindex] ImageWidth=ll_width
Ist_TabPages [ai_tabindex] ImageHeight=ll_height

St_TCClient lst_Client
GetClientHwnd (lst_Client, lst_TC_ITEM lParam, 28)

Ist_TabPages [ai_tabindex] Enabled=IsWindowEnabled (lst_Client. HWND)
LONG ll_Loop, ll_Count
Ll_Count=UpperBound (iuo_Requestor. Control)
FOR ll_Loop=1 TO ll_Count
IF the Handle (iuo_Requestor. Control [ll_Loop])=lst_Client. The HWND THEN
Ist_TabPages [ai_tabindex]. Visible=iuo_Requestor. Control [ll_Loop]. Visible
The EXIT
END the IF
NEXT
RETURN 1

CodePudding user response:

Ah, pb pins

CodePudding user response:

Superior speed to help

CodePudding user response:

PB11 killing me!

CodePudding user response:

Try

The FUNCTION ulong TabCtrl_GetItem (ulong HWND, ulong wMsg, ulong wParam, ref st_TC_ITEM lParam) LIBRARY "user32. DLL" ALIAS FOR "SendMessageW; Ansi
"The Function long GetClientHwnd (REF st_tcclient Destination, long the Source of long Size) library "kernel32. DLL" Alias For "RtlMoveMemory; ANSI"

CodePudding user response:

Not SendMessageW tried earlier

CodePudding user response:

Who will save me, crazy

CodePudding user response:

Pb this is to let people upset, always some puzzling mistake ah, good miss Delphi, the whole project done impetuously Lao tze down with Delphi rewrite again, alas,

CodePudding user response:

Lst_TC_ITEM. LParam value this call? What is this? Where can I use the generated

CodePudding user response:

You encapsulated with Delphi or c + + standard DLL to pb just call
  • Related