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

C / C++ / MFC

 
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 
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 
It's not a good idea to copy code from elsewhere unless you have a good understanding of what it is doing. If the code is doing a specific task and you copy it to a new location, its role will change.

void OnClickMoveUp( void )
{
    int         nIndex;
    CString     strCommand;
 
    nIndex = m_listctrl.GetNextItem(-1, LVNI_SELECTED);
    ASSERT(-1 != nIndex);
 
    strCommand  = m_listctrl.GetItemText(nIndex, 0);
 
    m_listctrl.DeleteItem(nIndex);
 
    nIndex = m_listctrl.InsertItem(nIndex - 1, strCommand);
}



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

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


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 
AnswerRe: WIN32 and MFC FAQ's Pin
earl10-Jul-06 5:26
earl10-Jul-06 5:26 
AnswerRe: WIN32 and MFC FAQ's Pin
Joe Woodbury10-Jul-06 8:30
professionalJoe Woodbury10-Jul-06 8:30 
Questionpipe to istream Pin
khb10-Jul-06 3:27
khb10-Jul-06 3:27 
QuestionHelp!! Pin
Smith#10-Jul-06 3:05
Smith#10-Jul-06 3:05 

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.