Click here to Skip to main content
15,922,407 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: 'delete' operator Pin
David Crow21-Apr-06 9:12
David Crow21-Apr-06 9:12 
QuestionProblem with CSocket Listen function Pin
jpyp21-Apr-06 7:28
jpyp21-Apr-06 7:28 
AnswerRe: Problem with CSocket Listen function Pin
basementman21-Apr-06 8:35
basementman21-Apr-06 8:35 
GeneralRe: Problem with CSocket Listen function Pin
jpyp21-Apr-06 9:39
jpyp21-Apr-06 9:39 
QuestionHow to use Spy++? Pin
XXKKFF21-Apr-06 6:46
XXKKFF21-Apr-06 6:46 
AnswerRe: How to use Spy++? Pin
Eric Dahlvang21-Apr-06 6:52
Eric Dahlvang21-Apr-06 6:52 
QuestionVerify a message signed from javacard by smartcard in Visual C++ Pin
Malacitano21-Apr-06 6:34
Malacitano21-Apr-06 6:34 
QuestionChange the backgroound color for a CListCtrl control Pin
masnu21-Apr-06 6:16
masnu21-Apr-06 6:16 
AnswerRe: Change the backgroound color for a CListCtrl control Pin
Naveen21-Apr-06 21:15
Naveen21-Apr-06 21:15 
QuestionCComboBox - DropList Style- Horizontal Scrollbar? Pin
jayart21-Apr-06 6:08
jayart21-Apr-06 6:08 
AnswerRe: CComboBox - DropList Style- Horizontal Scrollbar? Pin
David Crow21-Apr-06 6:21
David Crow21-Apr-06 6:21 
Question[Message Deleted] Pin
sherton21-Apr-06 4:38
sherton21-Apr-06 4:38 
AnswerRe: System () in vc++ 6.0 Pin
toxcct21-Apr-06 4:52
toxcct21-Apr-06 4:52 
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 

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.