Click here to Skip to main content
15,892,517 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Visual studio question Pin
Shay Harel11-Dec-02 8:07
Shay Harel11-Dec-02 8:07 
GeneralRe: Visual studio question Pin
Shay Harel11-Dec-02 8:12
Shay Harel11-Dec-02 8:12 
GeneralRe: Visual studio question Pin
-=jarl=-11-Dec-02 8:29
-=jarl=-11-Dec-02 8:29 
GeneralRe: Visual studio question Pin
Navin11-Dec-02 7:23
Navin11-Dec-02 7:23 
GeneralRe: Visual studio question Pin
Shay Harel11-Dec-02 8:05
Shay Harel11-Dec-02 8:05 
GeneralRe: Visual studio question Pin
User 665811-Dec-02 8:09
User 665811-Dec-02 8:09 
GeneralRe: Visual studio question Pin
Alvaro Mendez11-Dec-02 8:36
Alvaro Mendez11-Dec-02 8:36 
GeneralListCtrl: maintain the slection after repopulating it... Pin
Joan M11-Dec-02 5:11
professionalJoan M11-Dec-02 5:11 
Hello,

INTRODUCTION:
I'm using a normal CListCtrl in a dialog based app.
When I update/edit a value in the ListCtrl (REPORT MODE) I validate it versus all the other values (they must follow some rules) and if some are not as they should have to be, I modify the variables that are linked to those parameters and then I re-populate ALL the ListCtrl reading those variables...

NOTE:
I know that this is not the best method... but it works and I have no time to improve it... moreover there are only 8 elements in the ListCtrl. Blush | :O

QUESTION:
In order not to fool the user I want to be able to place the selection where it was (over the last edited item). The fact is that I can see the selection mark over the desired element, but when I press the down arrow the selection gets placed over the first element. Confused | :confused:

After the edition I'm using this code now:
<br />
if (iElement == -1) iElement = this->m_ElementModificatAct.m_iItemActual;<br />
this->SetItemState(iElement, LVIS_SELECTED, LVIS_SELECTED | LVIS_FOCUSED);<br />
this->EnsureVisible(iElement, FALSE);<br />
this->SetSelectionMark(iElement);<br />

OK, the selection mark is drawn where it should be, but when I press the down arrow I get the selection not in the next element... I get it over the first element...

Could I do anything?

Thank you in advance.
GeneralRe: ListCtrl: maintain the slection after repopulating it... Pin
DRHuff11-Dec-02 9:32
DRHuff11-Dec-02 9:32 
GeneralRe: ListCtrl: maintain the slection after repopulating it... Pin
Joan M11-Dec-02 19:53
professionalJoan M11-Dec-02 19:53 
GeneralRe: ListCtrl: maintain the slection after repopulating it... Pin
Jean-Marc Molina3-Oct-03 0:33
Jean-Marc Molina3-Oct-03 0:33 
GeneralDirectShow & AVI Pin
YuriSp11-Dec-02 5:03
YuriSp11-Dec-02 5:03 
QuestionEmbedded CPropertySheet : HOWTO change CPropertyPage programatically ??? Pin
Luc Bergeron11-Dec-02 4:47
Luc Bergeron11-Dec-02 4:47 
AnswerRe: Embedded CPropertySheet : HOWTO change CPropertyPage programatically ??? Pin
Roger Allen11-Dec-02 6:09
Roger Allen11-Dec-02 6:09 
GeneralRe: Embedded CPropertySheet : HOWTO change CPropertyPage programatically ??? Pin
Luc Bergeron11-Dec-02 7:21
Luc Bergeron11-Dec-02 7:21 
GeneralNeed to make a MD5 of a file, non-RSA and non-MFC Pin
IGx8911-Dec-02 4:43
IGx8911-Dec-02 4:43 
GeneralTRACE to a log Pin
RobJones11-Dec-02 3:59
RobJones11-Dec-02 3:59 
GeneralRe: TRACE to a log Pin
benjymous11-Dec-02 4:03
benjymous11-Dec-02 4:03 
GeneralRe: TRACE to a log Pin
Navin11-Dec-02 5:36
Navin11-Dec-02 5:36 
GeneralRe: TRACE to a log Pin
Alvaro Mendez11-Dec-02 7:05
Alvaro Mendez11-Dec-02 7:05 
GeneralThanks everyone... Pin
RobJones11-Dec-02 8:40
RobJones11-Dec-02 8:40 
GeneralRe: Thanks everyone... Pin
Alvaro Mendez11-Dec-02 8:46
Alvaro Mendez11-Dec-02 8:46 
GeneralExpense of creating GDI objects Pin
raja huus11-Dec-02 3:52
sussraja huus11-Dec-02 3:52 
QuestionHow are the UI stuff actually drawn by Windows Pin
Malcom Krujic11-Dec-02 3:32
sussMalcom Krujic11-Dec-02 3:32 
AnswerRe: How are the UI stuff actually drawn by Windows Pin
jhwurmbach11-Dec-02 3:52
jhwurmbach11-Dec-02 3:52 

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.