IonicWind Software

Aurora Compiler => Coding Help - Aurora 101 => Topic started by: ExMember001 on November 13, 2006, 01:17:11 AM

Title: Listbox double click
Post by: ExMember001 on November 13, 2006, 01:17:11 AM
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 ?
Title: Re: Listbox double click
Post by: sapero on November 13, 2006, 02:52:28 AM
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)
Title: Re: Listbox double click
Post by: ExMember001 on November 13, 2006, 03:34:33 AM
Ha!
ill try that
Thanx Sapero ;)