Guy1954
unread,Mar 29, 2009, 10:20:55 PM3/29/09Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
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