Flicker free scrolling in a CFormView - ClistCtrl

Hi All,

I have a Cformview derived view which has a tab control and inside
that there is a listcontrol .
How to avoid flickering while scrolling in this custom view ? I tried
WM_ERASEBKGND but no success .

Please help me out ..

Regards,
JLD

0
9/18/2007 1:52:10 PM
vc.mfc 33608 articles. 0 followers. Follow

7 Replies
1571 Views

Similar Articles

[PageSpeed] 27

Here is an article that might help you:

http://www.codeproject.com/gdi/bufferdc.asp?df=100&forumid=521&exp=0&select=869537

Also, if you are going to repopulate a list control you can do:

m_clist.SetRedraw(false);

// add items to list

m_clist.SetRedraw(true);

to help with flickering.  You may want to investigate using a virtual list 
if you have a lot of items in the list:

http://www.codeproject.com/listctrl/virtuallist.asp

Tom

<ggurubasavaraja@gmail.com> wrote in message 
news:1190123530.218058.132990@57g2000hsv.googlegroups.com...
> Hi All,
>
> I have a Cformview derived view which has a tab control and inside
> that there is a listcontrol .
> How to avoid flickering while scrolling in this custom view ? I tried
> WM_ERASEBKGND but no success .
>
> Please help me out ..
>
> Regards,
> JLD
> 

0
tom.nospam (3240)
9/18/2007 2:50:24 PM
<ggurubasavaraja@gmail.com> wrote in message 
news:1190123530.218058.132990@57g2000hsv.googlegroups.com...
> Hi All,
>
> I have a Cformview derived view which has a tab control and inside
> that there is a listcontrol .
> How to avoid flickering while scrolling in this custom view ? I tried
> WM_ERASEBKGND but no success .
>

Make sure you set the WS_CLIPCHILDREN flag in the view and tab control 
windows so that the they don't first paint their backgrounds before the 
children paint right on top of them, causing flicker.

-- David


0
dc2983 (3206)
9/18/2007 7:27:30 PM
Thanks David ..

I tried to add the style cs.style |= WS_CLIPCHILDREN but still there
is the same amount of flickering happening.
when I removed it cs.style &= WS_CLIPCHILDREN I got an assertion
failure .So I think by default the style is set.
Am I doing the right thing here ?
One strange thing I observed during this process was earlier my scroll
bars were displayed in normal win2k style but after I removed the
style they were being displayed in xp style which is desired.

Regards,
JLD

0
9/19/2007 4:38:30 AM
Hi All,

I am facing this problem even if I remove the list contrl from my
view. Problem seems to be with the tab control , in addition to that I
have a toolbar placed in each of  the dialogs in the tab control .

Thanks in advance.


0
9/19/2007 4:52:07 AM
<ggurubasavaraja@gmail.com> wrote in message 
news:1190176710.040597.252110@z24g2000prh.googlegroups.com...
> Thanks David ..
>
> I tried to add the style cs.style |= WS_CLIPCHILDREN but still there
> is the same amount of flickering happening.
> when I removed it cs.style &= WS_CLIPCHILDREN I got an assertion
> failure .So I think by default the style is set.
> Am I doing the right thing here ?

Did you try this style in both the form and the tab control?


> One strange thing I observed during this process was earlier my scroll
> bars were displayed in normal win2k style but after I removed the
> style they were being displayed in xp style which is desired.
>

Very strange, no idea how this style would affect whether you get Common 
Controls 6 look.

-- David 


0
dc2983 (3206)
9/19/2007 1:46:14 PM
Yes I tried this style both in Tab control and the form .before I
modified the style the scroll bars would be displayed in xp only when
I clicked on them , they would turn into comm cntrl 6 look once the
repaint is called .
But my basic problem i,e the flickering still persists :(


0
9/20/2007 3:51:44 AM
any inputs !!! please help ..

0
10/9/2007 12:05:12 PM
Reply:

Similar Artilces:

Free Best Forex eBooks
-- Free Best Forex eBooks http://www.net-invest-mx.com ...

Excel compare workbooks: need to interrupt and resume sync scroll
When comparing workbooks, one may have many rows added in places. Users need to be able to interrupt synchronous scrolling to scroll past the added rows in one workbook, then resume sync scrolling. Without this ability, the compare workbooks feature has limited usefulness. The existing implementation seems to require me to reset both workbooks, scroll to the area of interest then resume the compare feature. Very cumbersome. If there is a way to interrupt and resume the sync scroll, it should be documented in help. ---------------- This post is a suggestion for Microsoft, and Micro...

Urgent: Switching between views derived from CFormView
Hi, I have a SDI application and have 2 views derived from CFormView. I am able to swap the views. But everytime I swap the view, it creates new view so I am not able to view my old data. On one view, I have Browser control, and on another I have few List Boxex. But, when I switch from List view o browser view, and back to List view, I loose all my selection. Can someone help me in resolving this issue? Help in regards of any samples is really is appreciated. Thanks in advance. Musa When you create the new view, are you passing it the same instance of the document as the old one? If not t...

Publisher project is flickering
While working on my publisher project, I noticed all the project items flickering vigourously for 15 seconds which seems forever virtually when I span the mouse across. Check to see if there are updated video drivers available. -- JoAnn Paules MVP Microsoft [Publisher] "hpum" <hpum@discussions.microsoft.com> wrote in message news:5DD25428-D8F3-41DF-946C-94DF08AADCAE@microsoft.com... > While working on my publisher project, I noticed all the project items > flickering vigourously for 15 seconds which seems forever virtually when > I > span the mouse ac...

A unique offer: get a version of Microsoft Outlook Add-ins from MAPILab free of charge! #2
We are happy to offer you an excellent opportunity to get Add-ins for Microsoft Outlook free of charge if you take part in testing or purchasing the products and services of our partners. This scheme is very simple: go to the stores of our partner sellers, offering you a comprehensive range of useful goods and services, through offer at the MAPILab website. As a result our partner sellers pay for program, and you get a registered version free of charge, along with buying a necessary product or service (20- 40 different offers are usually available). Go to find and buy what you need, and get a...

Accessing the scrollbars of a CFormView?
Hi, How can one access the scrollbars that appear automatically when the CFormView is too small given the dimensions of the doc set by SetScrollSizes()? I also need to be able to draw these scrollbars using themes. I have been trying to catch WM_NCPAINT in a subclassed stored proc and using DrawThemeBackground and DrawThemeParentBackground, but I only obtain the main part of the scrollbar, not the arrows nor the textured corner. Please! -- Thanks in advance, Juan Dent, M.Sc. Hi Juan, Currently we still have been researching the 'How to use UXTHEME.LIB', our PSS engineer is...

free desktop windows xp calendar and clock
How can I get that? -- Sally Got Google? Sally wrote: > How can I get that? ...

When is control valid in CFormView
I have a CFormView with a CEdit derived class on the form. I want to set the font in the edit and resize the control at startup. I'm not getting the OnCreate() call on the edit control and it's not a valid window when the form view is created (OnCreate()). Can someone tell me how to know when the control is valid? Thanks mike wrote: > I have a CFormView with a CEdit derived class on the form. I want to set the > font in the edit and resize the control at startup. I'm not getting the > OnCreate() call on the edit control and it's not a valid window when the ...

Free Busy Information
Hi, Can someone please help me regarding free busy information? Am using Outlook 2007, Windows Vista Business. I cannot see the availability of other Outlook users if I wanted to schedule a meeting with them. It says no free/busy information could be retrieved. We're an organization of 40 staff. And out of 40, only 2 staff can view other's availability. Thanks. Bong Does everybody have their Outlook configured to publish Free/Busy information? Tools-> Options-> Calendar Options...-> button Free/Busy Options... Additionally you could try for t...

CListCtrl in Help About Dialog Box
Hi. I’ve used a CListCtrl before in my FormView, but I haven’t used it in a Help About dialog before and I’m having trouble. MyApp.cpp has code something like this: Void CMyApp::OnAppAbout() { CAboutDlg aboutDlg; aboutDlg.m_myListCtrl.InsertColumn(0, “Name”, LVCFMT_LEFT); } I get the assert in the call to InsertColumn(). It’s in the return statement in InsertColumn() where the assert occurs (in afxcmn.inl). Any idea? Thanks. That's because the list control hasn't been created yet (because the dialog box hasn't been created yet). So you have 2 choices. One is to ...

Free & Busy Showing Details
When I go to make an appointment and invite others, I can see thier appointments on thier calendars, if I hold my mouse pointer over the the appointment, it shows the ewxact details of that appointment. I NEED to disable this, is it possible. This seems to be a new feature of either Outlook 2003 or Exchange 2003. In older versions it was just a colored line during the appointment time frame ...

** One Million FREE Visitors **
How To Get 1 Million Visitors On Your Web Site Without Paying A Dime In advertising ! Are you frustrated by the lack of traffic coming to your site? If I would tell you that after months of research, I just got my hands on the most hidden secrets... Pssttt, yes precisely those secrets that the wealthy webmasters are using now to get their millions of hits every day. And let me tell you, it works... It's incredible to see all the knowledge they possess...they even have very sneaky tricks ! These well guarded secrets have just permitted me to go from 1000 visitors a year to more than 1,...

Problem with scrolling a worksheet
I have created and coded text-boxes ( using the design view and VB-code) in excel that enables me to jump from one text-box to anoter by using the Tab-button, but view of the worksheet does not follow the tab Thanks ! I suggest you add code to Select or GoTo a nearby cell before th textbox -- Message posted from http://www.ExcelForum.com Thank you for the tip I am a very new user so I am not so familiar with VB code yet Is it possible to get some help with the code Thanks! ...

Flickering problem #3
Hello, I've created a MFC based VC++ Dialog application. My Dialog box has the Green back ground color by overriding the OnCtlColor. In that i have three ActiveX Controls(Rounded Rectangle, Rectangle and a line). I'm moving these controls based on the value i read from the device. To move i'm using the following function call for all three controls. ::SetWindowPos(<Control windowhandle>, HWND_TOP, objMagnet.left + 15,objMagnet.bottom -1, nWidth, nHeight , SWP_SHOWWINDOW ); I move these controls atleast 5 times per second. Please help me how to get rid of the flickeri...

Free\Busy Time Setting
Hi I have set up a number of Rooms as Resources. When we Schedule a meeting, although the Resource is set up to Auto-Reply, the Meeting is booked in the Resource Diary, but does not Show up in a subsequent Meeting Schedule, as busy, for 15 minutes. I have set up the Resources to update every minute, but this does not seem to help. How do I change the Refresh on the Exchange Server. If I book another Meeting with the Resource, it adds the last meeting into the View Group Schedule list, but of course the Meeting I have just created waits another 15 minutes. Thanks Allan ...

No Free/Busy info displayed for after 1 Jan 2005
Hi Please assit if possible. My company makes use of the calendaring feature within exchange. All is working up to now, but when I try and view any information for or after 1 jan 2005 there is no information to display! PLEASE ASSIT ASAP I am experiencing the same problem, and have contacted 2 other organizations that I know use exchange and they are also experiencing this same issue. There is not free/busy data for 1 Jan 2005 or after. Config Exchange 2000 SP3 + Hotfix q320436 Dell Poweredge + 1Gb ram frank colson22 at hotmail com "Scott" wrote: > Hi Please assit if ...

Sroll Box within Scroll Bar
If I highlight a range in a work sheet to have row height increased and say range is from A1-A400. The scroll box within the scroll bar resizes for that range. If my spreadsheet however turns out to be only 50 rows(after entering data) not 400 the bar will still be sized to go from row 1 at the top to Row 400 at bottom(It can obvously go past that but the scroll box is sized for 400). I would like it to go back to its to size for the actual size of the data in the spreadsheet. I have tried to delete the rows from 50-400 but it has no effect. Any help would be appreciated as this is annoying pr...

Re: 'Scrolling' bitmaps
"Giovanni Dicanio" <giovanniDOTdicanio@REMOVEMEgmail.com> ha scritto nel messaggio news:... > I did this kind of things using DirectDraw. A final note: if I recall correctly, the DX7 SDK also offers examples of mixing DirectDraw and MFC. (However, I think that doing some web search will give interesting results for that.) Giovanni ...

Message which is called everytime a CFormView is created
Hallo, I have a program with a CSplitterWnd which divides 2 CFormViews. See link: http://wwwstud.fh-zwickau.de/~pafe/geb/1.jpg When I start the program the ListBox (CListView) on the right side gets filled in the method OnInitialUpdate(). When I navigate through the tree then the views on the right side are replaced. When I come back to the element, that displays the form with the List-Box, my ListBox is not filled with the data I provide in OnInitialUpdate. See link: http://wwwstud.fh-zwickau.de/~pafe/geb/2.jpg Now my question is: Where do I have to put the code (what message do I have to ...

strange free/busy symptoms.
Hi everyone, TIA for any advice. I am posting here because I do not thing at this time it is an Outlook issue. I have a user that cannot view free-busy scheduling when creating a new appointment and / or meeting request. What appears is the white, diagonal lines bar 'No Information'. Here is some other information: This person (along with everyone else) is using Exchange / Outlook 2003, SP2 with all updates. I've had him try the /cleanfreebusy switch with out any improved results. This does not happen all the time! One out of six (or so) tries, he will be able to view the...

Does Money 2005 include free on-line billpay?
In money 2004 you used to get free bill pay for 1 year with deluxe, 2 years with premum. That was in addition to the other online services. Is that still true with 2005, or was that a one-time deal? Looking at the Money web site, it doesn't say anything about that any more. I started with deluxe, and my year of bill pay is renewal soon. If 2005 does not include bill pay, I'm thinking of getting a discount copy of 2004 premium to get an extra year. If 2005 does include bill pay, I'm wondering if its possible to use the 2005 bil pay account but still stay with Money 2004 given ...

Free Visual Basic 2005 and ASP.NET 2.0 Training from Microsoft Learning
Hello: Any body has subscribed for 90 days trail version of "Free Visual Basic 2005 and ASP.NET 2.0 Training from Microsoft Learning"? If so, could you please send me the loging and password for those courses. Because that course is not available now. Thanks in advance. Regards Kristi. ...

CListCtrl::EnsureVisible question
The document says CListCtrl::EnsureVisible()'s return value indicates whether the call is successful or not. But the doc doesn't say how it can fail. When I check the MFC source came with VC++, I couldn't find the implementation of CListCtrl::EnsureVisible(). Could you point me to the location of this function in the MFC source? I'm using VC++6 "ICS GUI GUY" <ICS GUI GUY@discussions.microsoft.com> wrote in message news:9FCD2806-70EB-42CE-9F17-1819D01E6F28@microsoft.com... > The document says CListCtrl::EnsureVisible()'s return value > indicates whethe...

Welcome to OutlookFreeware.com: more than 70 free Microsoft Outlook Add-ins, Tools and Utilities
1. Export Messages to EML Format Exports messages to EML format using a specified folder. It is possible to retain the original Outlook folder structure. http://www.OutlookFreeware.com/en/products/all/OutlookMessagesExportEML 2. Add Attachments Attaches files from a specified folder to messages. It is possible to skip files with identical names. http://www.OutlookFreeware.com/en/products/all/OutlookAttachmentsAdd 3. Pack Attachments Packs attachments using specified file mask to one or more ZIP archives. Attaches resulting archives and deletes source attachments. Thus it becomes possible to ...

Cannot Scroll Global Address List
Using Outlook 2000, I cannot scroll with the wheel mouse the Global Address List or All Users under All Address Lists. I can scroll every where else in Outlook. ???? Ted ...