how to reduce flickering of controls ?

Hello There
My application has a three pane interface. To the left , there is one
tree control, to bottom there is a list control and to right , a
CHtmlView. My tree control has some preloaded items. My problem is
that whenever I try to resize tree control, browser (CHtmlView)
adjusts itself to remaining space. But it flickers a lot. How can I
stop this flickering ? Is there any way to minimize flickering ? Any
help would be gretly appreciated!
0
12/3/2004 10:53:30 AM
vc.mfc 33608 articles. 0 followers. Follow

2 Replies
487 Views

Similar Articles

[PageSpeed] 31

Roland wrote:

> Hello There
> My application has a three pane interface. To the left , there is one
> tree control, to bottom there is a list control and to right , a
> CHtmlView. My tree control has some preloaded items. My problem is
> that whenever I try to resize tree control, browser (CHtmlView)
> adjusts itself to remaining space. But it flickers a lot. How can I
> stop this flickering ? Is there any way to minimize flickering ? Any
> help would be gretly appreciated!

An explanation on why you see flicker might help (if you don't know this 
already): the screen flickers because in a very small timeframe the 
pixels are blitted multiple time to the screen in a different colour. 
When a control is completely written by yourself the easiest solution is 
a memory dc (there is an implementation of this on codeproject 
somewhere, though it's not hard to write yourself): first you draw 
everything to a dc in memory and only then to the screen, hence only one 
blit and no more flicker.
Another problem is if your right view gets resized constantly (set a 
trace in the OnSize method if you can or use spy++ to check the 
messages): then you can't use a mem dc, because each resize obviously 
means that the view must be redrawn. But if you resize to different 
positions in a small timeframe you'll obviously have flicker. Only 
solution here is to find out why you get so many WM_SIZE messages and 
see if you can't reduce them.

best regards
crimson13
0
12/3/2004 1:21:06 PM
Remove CS_HREDRAW and CS_VREDRAW from the parent frame(these are class
styles). This will stop the redraw messages that are being sent to
view when you resize.

-----
Ajay Kalra
ajaykalra@yahoo.com

ajay.sonawane@gmail.com (Roland) wrote in message news:<69c0226e.0412030253.394ba1de@posting.google.com>...
> Hello There
> My application has a three pane interface. To the left , there is one
> tree control, to bottom there is a list control and to right , a
> CHtmlView. My tree control has some preloaded items. My problem is
> that whenever I try to resize tree control, browser (CHtmlView)
> adjusts itself to remaining space. But it flickers a lot. How can I
> stop this flickering ? Is there any way to minimize flickering ? Any
> help would be gretly appreciated!
0
ajaykalra (6842)
12/3/2004 4:40:08 PM
Reply:

Similar Artilces:

Edit control #2
-- Just Al ...

Set focus on controls of modeless form
When I initially load my modeless form, the input focus usually begins on my first textbox control (or any other control). However, if you click on the spreadsheet, then click back to the modeless control, the input focus is lost (ie. not set on any control). How can I set the input focus back on Textbox1 if someone clicks on the spreadsheet and then clicks back to the modeless form??? I already tried the following code, but it doesnt work: Private Sub UserForm_Activate() UserForm1.TextBox1.SetFocus End Sub Hi Robert, I don't know ...

reduce document print size
This seems like it should be an obvious answer, but I can't figure it out. I have a 24"x18" sign in Publisher, I want to reduce it to postcard size, or about 6"x4.5". I can't find any print driver setting to allow me to do this. There is a setting for 25% reduction but thats a function of the printer driver. Does publisher have a function to allow me to reduce the print size down to 12.5%? Hmmm.... I suppose I could output to jpg and reduce with photoshop.... surely there is a much easier answer though. Thanks! If there is text involved, the conversion...

Control are unicode...
Hi, I have a unicode project, and all the controls are unicode, i need to make a few of these controls NOT unicode because they are not displaying my custom created font (*.fnt) which has only 255 chars in it correctly. I need to change CEdit and CListCtrl to a non-unicode control. Is this possible? If i create a new non-unicode project, my fonts show correctly. joe # ...

Listview Control
Hello. I have a table with the following format: Month CostumerName October 2009 Costumer1 November 2009 Costumer1 January 2009 Costumer2 February 2009 Costumer2 I want to display this information in a form. I though on using a listview control with 2 columns. Costumer names has the Header Text and "Month" has the information to fill the Listview. Someting Like the following: Costumer1 Costumer2 October 2009 January 2009 November 2009 February 2009 Is this possible? If not, any sugestions? Thanks Luis. Hi, y...

How to reduce table?
I have a table with over 5000 rows. However, only about 2500 rows contain info, the rest are empty rows (one row with info, next empty, etc). I deleted a few rows by clicking on them and holding Ctrl key. But is there a way to delete several hundreds of empty rows at once? If there is, may someone please tell me how to do it! -- Ilya Zeldes Fort Myers, Florida Select a column that has empty cells. F5>Special>Blanks>OK. Edit>Delete>Entire Rows. Gord Dibben MS Excel MVP On Mon, 7 Aug 2006 21:56:51 -0400, "ilyaz" <ilyaz33@hotmail.com> wrote: >I h...

Reducing the Database
I hope someone can verify this for me as I read it and cant find the original source again. I had a user with a mailbox size of 1g. I have deleted every item in his mailbox, with the exception of a few emails (no attachment) and expect his mailbox size to be well under 50 mb. I have did not perform an offline defrag on this mail server, but rather moved the user to a new mail server. Should his current mailbox size now reflect 50 mb or will it show 1g as it did on the other server? Thanks Ken Depends :-) What is your Deleted Items Retention policy? If you deleted everything yesterda...

treeview control problems
All, I am trying to get my Excel application to work on a new PC. All of the references have been established, particularly MSCOMCTL.ocx which contains the treeview control. However. when I go to the toolbox and try "Additional Controls..." the treeview control does not show up. I am using Excel 2007. Any thoughts? While I am on the subject of treeview controls - is there one that anyone would like to recommend that is more recent than "tree view activeX control - 2007"? A third party would be fine so long as I can distribute it to at least 5 - 10 other...

Referring to a control on another form
I have a report form which enables 16 different reports; I have managed this by using 4 different Option Groups, each with 2 buttons - no defaults. A Command button traps non-selections, contains all the if statements and executes the relevant report; that works fine. I thought that it would be useful to allow the user to determine which of the buttons should be a default. I have built a Parameter Form, arranged another set of option buttons with another Command button, but when I write the code to change the default status of one of the original buttons, I can't get it to work. ...

the viewstate hidden field, how can I reduce it?
hi asp.net 3.5 I see in my page that the hidden field viewstate is relativly very large, and are looking for ways to reduce it. Because I think it can improve ranking. <input type="hidden" name="__VIEWSTATE" id="__VIEWSTATE" value="WJ6eLjF5Grnr80+KngeZIcTDmEbX+zjv6ptIUmMgYaqKCBB/5hAKJ748W52U1l74GfNLHDuTLuwC/O4GQE/Sp+BnQYsW+nJHK+Qkg6xfb467kHRpiCUUl/Uv2tgQssSa2K4sfbMyaL/IIlb03091A3lbQV1wLMDvL7NPqXgwJERA1+Cx2eNlzll2WkbhNQw5Ne0FmtmBXaZysPeDEeQIrl5R2IesEHnCbrG5Mz2otNviv2JKia1yXgAKw3ljDlH7wmYWOF+WXn9lhsF5YElQnMZV2hpzQjJ91O5YARub/ci77gftNaI2Z6FqHjH...

Control color skin
Hello, I am updating an old legacy application (5 years old). I was able to get the application to compile with VC++2008. However, I noticed, that the button controls are still the old style (tan), and not the new colors, which are white with a blue trim. In the resource editor, the controls are disiplayed with the new colors, but after I compile the applications, and then run the program, the old colors are displayed. What changes do I have to make, to the code, libraries.., to be able to see the new control colors? TIA, -jc Do you have an old style manifest compiling i...

reduce printing
I am using MS Publisher 2003. I want to print our school paper which I formatted to 12" x 18" but reduced to the size of a legal size bond paper, 8.5" x 14". I am using Epson Stylus C43SX printer. What should I do? ...

Edit Control read only mode.
Hi, I have this edit control in a dialog which I want in a read only mode. In my program, I set the text in this control. But frustrating thing is, the text is always highligted when the dialog shows up. Is there any way to clear this highlighting? Also, is there a way to keep the background white even if it is readonly? Thanks, -PJ "pj" <praneshrj@gmail.com> wrote in message news:1181174120.387283.225960@a26g2000pre.googlegroups.com... > Hi, > > I have this edit control in a dialog which I want in a read only mode. > In my program, I set the text in this cont...

Flicker with OpenGL and docking window
Hi all, I am using OpenGL in my MDI app. I have a docking window pane as child of MainFrame having a tree control. I have other child frame windows whose client areas are being pained using OpenGL. The problem is like this:- When any of my child frame windows is in maximized condition and I resize the dockable pane(while docked vertically to the LEFT) the whole drawing(in client area) first moves(to left or right depending upon in what direction the pane was resized and by how much) briefly and then resizes. This produces a nasty flicker. While what is wanted is the resizing of the drawing ...

Controls
Take win explorer has two view(tree,list).My Problem is how to attach control(toolbar,statusbar) to any one view?. ravikumar wrote: > Take win explorer has two view(tree,list).My Problem is > how to attach control(toolbar,statusbar) to any one view?. Use CFormView. The MFC sample DLGCBR32 shows how to attach a toolbar and statusbar to a dialog. The same technique works on a CFormView. -- Scott McPhillips [VC++ MVP] You can also create separate frame windows for each view that needs it's own control bars. Tom "ravikumar" <arravikumarmail@yahoo.co.in> wro...

Greying Out Controls
Hi Guys, I'm trying to get a control on a form to become greyed out when i tick a check box.I know there's been a couple of threads on this before and i've actually got it to work but when i open the form again the control is no longer greyed out, even though the checkbox still has the check mark in it ?? Any help would be great, Thanks everyone, Jen On Tue, 5 Jan 2010 07:22:01 -0800, Jen wrote: > Hi Guys, > I'm trying to get a control on a form to become greyed out when i tick a > check box.I know there's been a couple of threads on this ...

Control C to Copy
I have Excel 2003 now. Control-C is the command to copy a cell. . . but only if I use the Left Control button. Control-C using the RIght Control button gives me the "cent" sign. How do you change the default Hotkey settings? I want to use both Control-C buttons as the copy command. ...

Reduce file size.
My file was 90Kb before I formated some cells and when I saved it, the size jumped to 180kb. Double What I think happened is instead of formatting only 5 cells, by mistake I formatted 5000 cells. But they're still all empty, so does it matter Is there any way I can reduce the size back to 90Kb or so, because I copy this file on my pocket PC and can't afford to waste any memory Thanks! "Guido" <anonymous@discussions.microsoft.com> wrote in message news:9FF56E06-1092-4124-9B7D-D3A10F448AE2@microsoft.com... > My file was 90Kb before I formated some cells and when I...

how to reduce high cpu usage
When I run Outlook 2003 on my dell M1210 notebook, the CPU usage increase and slower down other services. The cpu given spike usage in every 1-2 seconds. How to resolve this and what is the cause of it? How often are you polling for new mail and do you have your antivirus set to scan incoming/outgoing mail? Do you have any add ins or COMs installed? Any synching software or fax software? -- Kathleen Orland Outlook Tips: http://www.outlook-tips.net/ http://www.howto-outlook.com/ "Kairo Ismail" wrote: > When I run Outlook 2003 on my dell M1210 notebook, the CPU usage i...

Reduce the virtual Memory used by application
Hi , I have several servers in (VC++) running on a windows XP having 1G of RAM. These servers does some polling to some of the devices/process requests from the client. But i always see a hardisk usage(the harddisk usage light is flickering).?. Why is this happening. Its showing the mem usage around 4 MB and virtual memory as some 5 MB or so..?Why does this happen. ?.Since i am having plenty of RAM, and i dont quite understand why the hardisk is being used. Is there any compilation option that i should use ? Appreciate ur inputs on this Thanks May be some applications are accessing disk f...

Outlook View Control embedded in custom control
Hi, I am using VSTO 2005, Outlook 2003, c#. I created a windows user control using c#.I used the outlook view control inside this user control. Then i embedded this user control(contaning the OVC) in an html page on my hard disk. I then set this html page as a home page to one of my outlook folders. It displays the page correctly, along with OVC and list of messages inside it. But, when i click on any message in the OVC, it does not display the reading(preview) pane.Also, all the options of View->Reading Pane in the menu bar are disabled whenever this page is set as home page ! Please can ...

Unable to control indexing in Outlook 2007
I am unable to choose which Outlook 2007 data files will be indexed after reinstalling Office (after a clean install of Windows 7-64 bit). Only my main file is being indexed. When I go to indexing options the box "index messages in these data files" is empty (does not even show my default ..pst) and I am unable to type in it to add any of my personal .pst files. So when I perform a mail search, it only looks in my inbox and sent items. Those do seem to be fully indexed, however. -- Silvia ...

CPaintDC and Tab Control ?
Could any one explain how this code segment could be correctly written. It's a dialog-based program with a tab control. And for this example, two bitmaps should be painted on Tab2 of three. And any variable not declared locally is declared in the class declaration. Also, I need to paint them directly onto the dialog form since there will be many small bitmaps (in the thousands) row after row with 12 to 20 in a row. void CTab2::OnPaint() { CPaintDC dc(this); if(bUpdateBmp) { bmp.LoadBitmap(Crd); bmp.GetBitmap(&BmpInfo); dcMem.CreateCompatibleDC(&a...

How do I reduce size of newsletter in publisherfrom 4 to 2 pages?
I need only a 2 page newsletter. Haven't figured out how to reduce size of templates given from 4 to 2. Delete the pages you don't want. -- JoAnn Paules MVP Microsoft [Publisher] "Elizabeth" <Elizabeth@discussions.microsoft.com> wrote in message news:ADB37C8F-8E4F-4299-BB10-E99C310416A5@microsoft.com... >I need only a 2 page newsletter. Haven't figured out how to reduce size of > templates given from 4 to 2. In Publisher 2000 it's Edit Delete page -- Don Vancouver, USA "Elizabeth" <Elizabeth@discussions.microsoft.com> w...

Looking for control to browse files
Hi, I am pretty new to and unexperienced with access (2007 is the one I amworking with) I have made a database (of 1 table) to record registered mail and such. I have added a hyperlink field which contains the link to a specific transmittal document showing the contents of the mail item. I have added it to the form and it works fine. If I click on the link it opens the (Word) transmittal file). So far so good. What I want is a control that lets me browse for the transmittal file, something like a simple Open dialog Can someone point me to the right documentation, please ...