Click here to Skip to main content
15,917,618 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Generaldisable drag&drop in RichEdit Pin
pépé5-Aug-03 2:49
pépé5-Aug-03 2:49 
GeneralMigrate from printf to streams in my logfile class. Pin
justin2235-Aug-03 2:34
justin2235-Aug-03 2:34 
QuestionUrgent!!!Someone help please??? Pin
xxhimanshu5-Aug-03 2:21
xxhimanshu5-Aug-03 2:21 
AnswerRe: Urgent!!!Someone help please??? Pin
Neville Franks5-Aug-03 11:50
Neville Franks5-Aug-03 11:50 
GeneralRe: Urgent!!!Someone help please??? Pin
xxhimanshu6-Aug-03 23:55
xxhimanshu6-Aug-03 23:55 
GeneralRe: Urgent!!!Someone help please??? Pin
Neville Franks7-Aug-03 5:47
Neville Franks7-Aug-03 5:47 
GeneralWTL ComboBox Pin
Luke Murray5-Aug-03 2:16
Luke Murray5-Aug-03 2:16 
GeneralPosition cursor on last item in CListCtrl (reportmode) Pin
Wim Jans5-Aug-03 1:48
Wim Jans5-Aug-03 1:48 
Hello all,

I'm having troubles positioning my current record indicator programmicaly on the last record.
Let's say I have a CListCtrl in report mode, Filled with some records.

I have a button which inserts a new record in the list, and I want to position the record indicator (that blue line) on the newly inserted record.

I tried:

m_cListCtrl.EnsureVisible(m_cListCtrl.GetItemCount()-1, FALSE);<br />
m_cListCtrl.SetItemState(m_cListCtrl.GetItemCount()-1, LVIS_SELECTED, LVIS_SELECTED);<br />
m_cListCtrl.SetSelectionMark(m_cListCtrl.GetItemCount()-1);<br />


which shows me the record, the blue line is in the correct position, but my focus isn't. When I press Up, the record indicator jumps back 2 positions.

What is the correct way to do this positioning?
GeneralRe: Position cursor on last item in CListCtrl (reportmode) Pin
David Crow5-Aug-03 3:05
David Crow5-Aug-03 3:05 
GeneralRe: Position cursor on last item in CListCtrl (reportmode) Pin
Wim Jans5-Aug-03 6:43
Wim Jans5-Aug-03 6:43 
General__gc Pin
devvvy5-Aug-03 1:31
devvvy5-Aug-03 1:31 
GeneralDataGrid problem Pin
siddharth235-Aug-03 1:29
siddharth235-Aug-03 1:29 
GeneralRuntime error Pin
si_695-Aug-03 1:09
si_695-Aug-03 1:09 
GeneralCreating Outlook Express button Pin
beside5-Aug-03 0:44
sussbeside5-Aug-03 0:44 
GeneralRe: Creating Outlook Express button Pin
Eugene Pustovoyt5-Aug-03 1:57
Eugene Pustovoyt5-Aug-03 1:57 
GeneralRe: Creating Outlook Express button Pin
beside5-Aug-03 2:21
sussbeside5-Aug-03 2:21 
GeneralVariable number of arguments... Pin
Anonymous5-Aug-03 0:33
Anonymous5-Aug-03 0:33 
GeneralRe: Variable number of arguments... Pin
Ryan Binns5-Aug-03 0:41
Ryan Binns5-Aug-03 0:41 
GeneralRe: Variable number of arguments... Pin
Ted Ferenc5-Aug-03 0:47
Ted Ferenc5-Aug-03 0:47 
GeneralRe: Variable number of arguments... Pin
HPSI5-Aug-03 0:55
HPSI5-Aug-03 0:55 
General.Net proj Pin
Nilesh K.5-Aug-03 0:29
Nilesh K.5-Aug-03 0:29 
GeneralRe: .Net proj Pin
HPSI5-Aug-03 1:06
HPSI5-Aug-03 1:06 
GeneralLeaks font resourse at use CIpAddressCtrl Pin
Eugene Pustovoyt5-Aug-03 0:27
Eugene Pustovoyt5-Aug-03 0:27 
GeneralRe: Leaks font resourse at use CIpAddressCtrl Pin
HPSI5-Aug-03 1:00
HPSI5-Aug-03 1:00 
GeneralRe: Leaks font resourse at use CIpAddressCtrl Pin
Eugene Pustovoyt5-Aug-03 1:42
Eugene Pustovoyt5-Aug-03 1:42 

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.