WinBatch Tech Support Home

Database Search

If you can't find the information using the categories below, post a question over in our WinBatch Tech Support Forum.

TechHome

Control Manager
plus
plus

Can't find the information you are looking for here? Then leave a message over on our WinBatch Tech Support Forum.

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
File Created: 1999:04:15:16:47:38
Last Updated: 1999:04:15:16:47:38