April 30, 2024, 10:47:34 PM

News:

Own IWBasic 2.x ? -----> Get your free upgrade to 3.x now.........


Listbox double click

Started by ExMember001, November 13, 2006, 01:17:11 AM

Previous topic - Next topic

0 Members and 1 Guest are viewing this topic.

ExMember001

hi,
I'm trying to detect doubleclick on my listbox
it seems to be easy but its seems it doesnt work this way ;)

look ...


AmpKC::OnNotify(INT code,INT nID,NMHDR *pnmhdr),INT
{
select nID
{
case Playlist:
    select code
{
case LBNDBLCLK:
messagebox(this,"Dclicked!","test");
    int selected = PlaylistB->GetCurSel();
string filen = PlaylistB->GetItemText(selected);
string fpath = ARegGetValue("HKEY_CURRENT_USER\\Software\\AmpKC\\Internal\\Playlist\\",filen);
BASS_ChannelStop(stream);
            BASS_StreamFree(stream);
            stoptimer();
            ScrollB->SetScrollPos(0);
            playing = false;
            Play(fpath+filen);
            GetandSetTags(stream);
            playing = true;
            bplay->enable(false);
            bpause->enable(true);
            bstop->enable(true);

}
}
return;
}


is there something i'm missing ?

sapero

A listbox sends notifications only in WM_COMMAND form, so you should use OnControl for listbox.
LBNDBLCLK is sent only if control styles includes LBS_NOTIFY style (1)

ExMember001

November 13, 2006, 03:34:33 AM #2 Last Edit: November 13, 2006, 03:44:43 AM by KrYpT
Ha!
ill try that
Thanx Sapero ;)