Article View: comp.os.os2.programmer
Article #2085Re: Receiving LN_ENTER with a LS_MULTIPLESEL listbox?
From: Carl+Chris Samos
Date: Thu, 15 Oct 1992 15:05
Date: Thu, 15 Oct 1992 15:05
24 lines
1183 bytes
1183 bytes
Well, I just thought of a way I could have not used that static int in my
solution. I should just store the index in the QWS_USER field of the listbox:
case WM_DRAWITEM:
if (SHORT1FROMMP(mp1) == ID_LISTBOX) {
WinSetwindowUShort(WinWindowFromID(hWnd, ID_LISTBOX), QWS_USER,
((POWNERITEM) mp1) -> idItem);
}
return(FALSE);
break;
case WM_CONTROL:
if (SHORT1FROMMP(mp1) == ID_LISTBOX) {
if (SHORT2FROMMP(mp1) == LN_ENTER) {
int nIndex;
nIndex = WinQueryWindowUShort(WinWindowFromID(hWnd, ID_LISTBOX),
QWS_USER);
}
}
return(0);
break;
-Carl
Technical Details
Message-ID:
<Bw64Ks.50D@news.cso.uiuc.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!think.com!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!cjs33278References:
<719058360.F00050@monly.wlink.nl.wlink.nl> <Bw4IEL.JHn@news.cso.uiuc.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.os.os2.programmer Path: arc1-ca.pugleaf.net!sparky!uunet!think.com!sdd.hp.com!ux1.cso.uiuc.edu!news.cso.uiuc.edu!uxa.cso.uiuc.edu!cjs33278 From: cjs33278@uxa.cso.uiuc.edu (Carl+Chris Samos) Subject: Re: Receiving LN_ENTER with a LS_MULTIPLESEL listbox? References: <719058360.F00050@monly.wlink.nl.wlink.nl> <Bw4IEL.JHn@news.cso.uiuc.edu> Message-ID: <Bw64Ks.50D@news.cso.uiuc.edu> Sender: usenet@news.cso.uiuc.edu (Net Noise owner) Organization: University of Illinois at Urbana Date: Thu, 15 Oct 1992 15:05:13 GMT Lines: 25