How to send a CBN_SELCHANGE message when using CB_SETCURSEL?

后端 未结 3 357
醉酒成梦
醉酒成梦 2021-01-20 09:55

When using the CB_SETCURSEL message, the CBN_SELCHANGE message is not sent.

How to notify a control that the selection was changed

3条回答
  •  生来不讨喜
    2021-01-20 10:28

    I just discovered calling these SendMessages to the Combobox twice works... I know it's not perfect but it worked for me. (Written in VB6)

        For looper = 1 To 2
    
            bVal = SendMessage(inHandle, COMBO.CB_SHOWDROPDOWN, True, 0)
            count = SendMessage(inHandle, COMBO.CB_SETCURSEL, 1, 0)
            count = SendMessage(inHandle, WIND.WM_LBUTTONDOWN, 0, -1)
    
        Next
    

提交回复
热议问题