cGetCBItem Returns Text Instead of Strings
Keywords: cSetCBItem
Question:
The function cSetCBItem seems to be hanging...any ideas?
Answer:
Try this code in place of the CSetCBItem......
;hCtlWnd is the hWnd of the Comboxbox control
;itemnum is the item number you want to set
;itemnum = 2
cbsetcursel=334
wmcommand=273
gwlid= -12
cbnselchange=1
cPostMessage(hCtlWnd,cbsetcursel,itemnum,1)
TimeDelay(1)
parent=cWndInfo(hCtlWnd,3)
dll=strcat(DirWindows(1),"GDI.EXE") ; maybe user.exe or kernel.exe
xlong=DllCall(dll,long:"GetWindowLong",long:hCtlWnd,long:gwlid)
wlong=xlong & 65535
wparam= wlong | (cbnselchange << 16)
; or maybe wparam= cbnselchange | ( wlong << 16)
cPostMessage(parent,wmcommand,wparam,hCtlWnd)
Article ID: W12498
Filename: CSetCBItem hang.txt