|
From: Nathan S. <str...@ho...> - 2001-04-06 23:47:18
|
----- Original Message -----
From: "Pschernig" <psc...@ao...>
To: <dev...@li...>
Sent: Saturday, April 07, 2001 8:36 AM
Subject: Re: [Dev-C++] ListBox selections
> >
> >
> > > Opps, I do have the LBS_NOTIFY style but I never receive the
> message. I am
> > > processing it as a part of WM_COMMAND message
> > >
> >
> > any know how?
> >
> > I have a listbox with LBS_NOTIFY style but my app receives no
> messages when
> > a user selects an item in the listbox.
> >
>
> For me, a WM_COMMAND message is sent to the window procedure, with the
> LBN_SELCHANGE notification code. So, to get more help, you will have
> to post the part of the code where you process the WM_COMMAND message,
> and maybe the code which creates the listbox. Somewhere there must be
> a bug in your code.
>
> Elias Pschernig
>
>
hChildPB=CreateWindow("LISTBOX","",WS_CHILD | WS_CLIPSIBLINGS | LBS_NOTIFY
| WS_VSCROLL, 10,40,148,180,hwnd,NULL,g_hInst,0);
above is how I create it.
case WM_COMMAND:
switch( wParam )
{
case LBN_SELCHANGE:
itoa(10,TempText,10);
MessageBox(hwnd,TempText,TempText,MB_OK);
break;
then rest of my WM_COMMAND case which all works.
|