Click here to Skip to main content
15,896,526 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: System () in vc++ 6.0 Pin
sherton22-Apr-06 0:39
sherton22-Apr-06 0:39 
GeneralRe: System () in vc++ 6.0 Pin
super_ttd22-Apr-06 6:24
super_ttd22-Apr-06 6:24 
AnswerRe: System () in vc++ 6.0 Pin
David Crow21-Apr-06 4:54
David Crow21-Apr-06 4:54 
AnswerRe: System () in vc++ 6.0 Pin
Aqueel21-Apr-06 5:23
Aqueel21-Apr-06 5:23 
QuestionShortDate in MFC Pin
QuickDeveloper21-Apr-06 4:33
QuickDeveloper21-Apr-06 4:33 
AnswerRe: ShortDate in MFC Pin
James R. Twine21-Apr-06 4:50
James R. Twine21-Apr-06 4:50 
AnswerRe: ShortDate in MFC Pin
Roger Stoltz21-Apr-06 4:55
Roger Stoltz21-Apr-06 4:55 
Questionlistview position after inserting an item Pin
karfi21-Apr-06 3:57
karfi21-Apr-06 3:57 
Hi!

I have a listview control ("SysListView32" window class) in my application.
The content of this listview is changing frequently (say 1 (insert or delete) item/sec).
It is created with (LVS_NOCOLUMNHEADER | LVS_REPORT | LVS_SORTASCENDING | LVS_SINGLESEL | LVS_OWNERDRAWFIXED) style flags.

If we see the last items of the listview (the scrollbar is on the bottom) and the inserted (or deleted) item's position is on the beginning of the list, the whole content of the listview is scrolled up / down (because the scrollbar position is not changing).

I thing this is very annoying for the users (and for me), and I decided to "fix" the position of the scrollbar by using the LVM_ENSUREVISIBLE and WM_SETREDRAW messages like this:

1, send WM_SETREDRAW (FALSE)
2, send LVM_INSERTITEM or LVM_DELETEITEM
3, adjust the scrollbar position by sending LVM_ENSUREVISIBLE
4, send WM_SETREDRAW (TRUE)

It works fine with LVM_DELETEITEM.
But LVM_INSERITEM scrolls the content (it is visible!) even if there is the "setredraw(false)" call before sending LVM_INSERITEM message!

Has anybody ever faced this problem or maybe I did something wrong?

Thanks,
mate

(I already posted this to another forum but i had no answer)
QuestionDisabling Wireless while on network Pin
lynchspawn21-Apr-06 3:33
lynchspawn21-Apr-06 3:33 
QuestionInformation on cells of a CListctrl Pin
Sandeep A.C21-Apr-06 3:22
Sandeep A.C21-Apr-06 3:22 
AnswerRe: Information on cells of a CListctrl Pin
Naveen21-Apr-06 3:36
Naveen21-Apr-06 3:36 
AnswerRe: Information on cells of a CListctrl Pin
James R. Twine21-Apr-06 4:43
James R. Twine21-Apr-06 4:43 
Questionquery on domodal dialogboxes Pin
swapna_signsin21-Apr-06 3:07
swapna_signsin21-Apr-06 3:07 
AnswerRe: query on domodal dialogboxes Pin
includeh1021-Apr-06 3:13
includeh1021-Apr-06 3:13 
GeneralRe: query on domodal dialogboxes Pin
includeh1021-Apr-06 3:40
includeh1021-Apr-06 3:40 
QuestionI/O to a file Pin
CPP91121-Apr-06 2:55
CPP91121-Apr-06 2:55 
AnswerRe: I/O to a file Pin
Aqueel21-Apr-06 4:49
Aqueel21-Apr-06 4:49 
QuestionChange CView to CScrollView Pin
pathakr21-Apr-06 2:23
pathakr21-Apr-06 2:23 
AnswerRe: Change CView to CScrollView Pin
David Crow21-Apr-06 2:26
David Crow21-Apr-06 2:26 
AnswerRe: Change CView to CScrollView Pin
includeh1021-Apr-06 3:24
includeh1021-Apr-06 3:24 
Questionmove graphic line Pin
yang__lee21-Apr-06 2:16
yang__lee21-Apr-06 2:16 
AnswerRe: move graphic line Pin
Cedric Moonen21-Apr-06 2:22
Cedric Moonen21-Apr-06 2:22 
GeneralRe: move graphic line Pin
yang__lee21-Apr-06 2:32
yang__lee21-Apr-06 2:32 
GeneralRe: move graphic line Pin
Cedric Moonen21-Apr-06 2:48
Cedric Moonen21-Apr-06 2:48 
GeneralRe: move graphic line Pin
yang__lee21-Apr-06 18:21
yang__lee21-Apr-06 18:21 

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.