Click here to Skip to main content
15,942,774 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: list control Pin
Sarath C10-Jul-06 4:17
Sarath C10-Jul-06 4:17 
AnswerRe: list control Pin
David Crow10-Jul-06 4:19
David Crow10-Jul-06 4:19 
GeneralRe: list control Pin
jokefake10-Jul-06 5:46
jokefake10-Jul-06 5:46 
GeneralRe: list control Pin
David Crow10-Jul-06 6:11
David Crow10-Jul-06 6:11 
GeneralRe: list control Pin
jokefake10-Jul-06 6:39
jokefake10-Jul-06 6:39 
QuestionRe: list control Pin
David Crow10-Jul-06 6:41
David Crow10-Jul-06 6:41 
AnswerRe: list control Pin
jokefake10-Jul-06 6:48
jokefake10-Jul-06 6:48 
GeneralRe: list control Pin
David Crow10-Jul-06 7:31
David Crow10-Jul-06 7:31 
jokefake wrote:


i just removed some of the lines from the code

void CSpeedDial::OnSpeedDelete()
{
POSITION pos = m_speedList.GetFirstSelectedItemPosition();
int index = m_speedList.GetNextSelectedItem(pos);
m_speedList.DeleteItem(index);
// TODO: Add your control notification handler code here

}


Which can be shortened to:

void CSpeedDial::OnSpeedDelete() 
{
    int index = m_speedList.GetNextItem(-1, LVIS_SELECTED);
    if (index != -1)
        m_speedList.DeleteItem(index);
}
jokefake wrote:
but how can i move an item up and down in the list


By deleting it and inserting it into the correct location.


"The largest fire starts but with the smallest spark." - David Crow

"Judge not by the eye but by the heart." - Native American Proverb


GeneralRe: list control Pin
jokefake11-Jul-06 1:57
jokefake11-Jul-06 1:57 
GeneralRe: list control Pin
David Crow11-Jul-06 2:07
David Crow11-Jul-06 2:07 
GeneralRe: list control Pin
jokefake11-Jul-06 2:57
jokefake11-Jul-06 2:57 
GeneralRe: list control Pin
David Crow11-Jul-06 4:52
David Crow11-Jul-06 4:52 
QuestionRe: list control Pin
jokefake11-Jul-06 5:29
jokefake11-Jul-06 5:29 
AnswerRe: list control Pin
David Crow11-Jul-06 5:39
David Crow11-Jul-06 5:39 
GeneralRe: list control Pin
jokefake11-Jul-06 6:01
jokefake11-Jul-06 6:01 
GeneralRe: list control Pin
David Crow11-Jul-06 6:19
David Crow11-Jul-06 6:19 
QuestionRe: list control Pin
jokefake11-Jul-06 7:02
jokefake11-Jul-06 7:02 
QuestionRe: list control Pin
David Crow11-Jul-06 7:11
David Crow11-Jul-06 7:11 
AnswerRe: list control [modified] Pin
jokefake11-Jul-06 23:50
jokefake11-Jul-06 23:50 
GeneralRe: list control Pin
David Crow12-Jul-06 2:23
David Crow12-Jul-06 2:23 
AnswerRe: list control Pin
FarPointer10-Jul-06 4:23
FarPointer10-Jul-06 4:23 
GeneralRe: list control Pin
jokefake10-Jul-06 5:49
jokefake10-Jul-06 5:49 
QuestionWIN32 and MFC FAQ's Pin
Abhi Lahare10-Jul-06 3:39
Abhi Lahare10-Jul-06 3:39 
AnswerRe: WIN32 and MFC FAQ's Pin
Sarath C10-Jul-06 4:13
Sarath C10-Jul-06 4:13 
AnswerRe: WIN32 and MFC FAQ's Pin
Jun Du10-Jul-06 4:32
Jun Du10-Jul-06 4:32 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.