News:

MASM32 SDK Description, downloads and other helpful links
MASM32.com New Forum Link
masmforum WebSite

Listbox event

Started by Farabi, January 17, 2010, 03:25:43 AM

Previous topic - Next topic

Farabi

How to know if something change the listbox selection? (invoke SendMessage,lb,LB_SETCURSEL,some_value,0)
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

TNick

You mean this?
http://msdn.microsoft.com/en-us/library/bb775161(VS.85).aspx

or

http://www.google.ro/search?q=LBN_SELCHANGE

However, note that it is not send when you use LB_SETCURSEL. Only when the user changes the selection directly.
Nick

Farabi

Quote from: TNick on January 17, 2010, 06:13:47 AM
You mean this?
http://msdn.microsoft.com/en-us/library/bb775161(VS.85).aspx

or

http://www.google.ro/search?q=LBN_SELCHANGE

However, note that it is not send when you use LB_SETCURSEL. Only when the user changes the selection directly.
Nick

Thanks.
Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"

jj2007

The handler might look like this.
SWITCH uMsg
CASE WM_COMMAND
mov ecx, lParam ; SWITCH uses eax, so we take ecx for the handle in lParam
movzx eax, word ptr wParam+2
switch eax ; the WM_COMMAND message

case LBN_SELCHANGE
call LbSel ; do whatever is necessary

Farabi

Those who had universe knowledges can control the world by a micro processor.
http://www.wix.com/farabio/firstpage

"Etos siperi elegi"