WinX: listbox control

1 view
Skip to first unread message

Guy1954

unread,
Mar 29, 2009, 10:20:55 PM3/29/09
to xblite
Hi Callum,

I would like to use the listbox control with WinX. How do I handle the
notification code $$LBN_SELCHANGE?

I uploaded vixen_listbox.zip, which contains:
- listbox.vxn: un very small test project for the ListBox control
- listbox.rc: the ressouce file
- listbox_api.x: the program generated with the switch "Use Windows®
API"
- listbox_winx.x: the same program generated with the switch "Use
Callum Lowcay's WinX"

In listbox_api.x, I test in the window procedure WndProc:
CASE $$WM_COMMAND
id = LOWORD(wParam)
notifyCode = HIWORD(wParam)
hCtr = lParam
SELECT CASE id
CASE $$listbox
IF notifyCode = $$LBN_SELCHANGE THEN
MessageBoxA (#winMain, &"Click event on listbox", &"Message
From VIXEN", 0)
END IF
and it works.

In listbox_winx.x, I test in the callback procedure winMain_OnCommand:
FUNCTION winMain_OnCommand (id, code, hwnd)
SELECT CASE id
CASE $$listbox
IF code = $$LBN_SETFOCUS THEN
WinXDialog_Error ("Click event on $$listbox", "Message From
VIXEN", 0) ' 0 = debug
END IF
(note $$LBN_SETFOCUS instead of $$LBN_SELCHANGE, which does not work)

How should I code with WinX the equivalent of the WinAPI version?

Bye! Guy
Reply all
Reply to author
Forward
0 new messages