System-wide repaint issue

Hello,

I am experiencing a spontaneous system-wide repaint, particularly when
performing a slow paint job. Every visible window on the screen
recieves a WM_PAINT message;  even the icons on the desktop are
repainted. I know that a call to Invalidate or RedrawWindow with a
NULL window handle will cause this, but I have been unable to find
this occuring within our code. I know that WM_PAINT is also
automatically sent when a window is resized, but the window is not
recieving WM_SIZE when this occurs. Any ideas what else might cause a
system-wide repaint?

Thanks,
-dp

0
dpeterson1 (10)
3/5/2007 9:39:56 PM
vc.mfc 33608 articles. 0 followers. Follow

7 Replies
1184 Views

Similar Articles

[PageSpeed] 0

Any chance you're doing a Invalidate() or RedrawWindow() or UpdateWindow() 
call on the desktop window or a NULL window?  That might becausing it to 
redraw everything.

Tom

<dpeterson@viztek.net> wrote in message 
news:1173130796.087735.307460@p10g2000cwp.googlegroups.com...
> Hello,
>
> I am experiencing a spontaneous system-wide repaint, particularly when
> performing a slow paint job. Every visible window on the screen
> recieves a WM_PAINT message;  even the icons on the desktop are
> repainted. I know that a call to Invalidate or RedrawWindow with a
> NULL window handle will cause this, but I have been unable to find
> this occuring within our code. I know that WM_PAINT is also
> automatically sent when a window is resized, but the window is not
> recieving WM_SIZE when this occurs. Any ideas what else might cause a
> system-wide repaint?
>
> Thanks,
> -dp
> 

0
tom.nospam (3240)
3/5/2007 9:53:19 PM
<dpeterson@viztek.net> wrote in message 
news:1173130796.087735.307460@p10g2000cwp.googlegroups.com...
> Any ideas what else might cause a
> system-wide repaint?
>

The system repaints when a system parameter, say set by 
SystemParametersInfo() is changed, and the WM_SETTINGCHANGE  message is 
broadcast to all top level windows, informing them of the change.  They 
force a repaint on themselves to re-read any parameters that have changed 
which they might depend on.

-- David (MVP)


0
dc2983 (3206)
3/6/2007 4:37:21 AM
>I am experiencing a spontaneous system-wide repaint, particularly when
>performing a slow paint job.

Are you using LockWindowUpdate anywhere?

Dave
0
davidl7375 (2060)
3/6/2007 9:31:03 AM
On Mar 6, 4:31 am, David Lowndes <Dav...@example.invalid> wrote:
> >I am experiencing a spontaneous system-wide repaint, particularly when
> >performing a slow paint job.
>
> Are you using LockWindowUpdate anywhere?
>
> Dave

Yes actually; but those calls were added yesterday and we've been
having this problem for a long time. Furthermore, Lock/
UnlockWindowUpdate (MFC) may never even occur during a typical run, it
is just a hack to prevent 3rd party library from redrawing for each
individual option being set when a bunch of options are being set
altogether.

As far as a WM_SETTINGCHANGE message is concerned:   I ran Spy++ and
logged all WM_SETTINGCHANGE messages and played around in our software
until an entire system repaint occurred. No WM_SETTINGCHANGE message.

Another possible lead:  I just read in the MSDN Library that windows
will post a WM_PAINT message if the window has an update region and
the message queue is empty;  We are using Invalidate to initiate a
redraw of the window; JUST the Invalidate. Delegating the
responsibility of posting the actual WM_PAINT message to windows may
be our problem. Will look into this further and repost if I determine
the root cause.

Thanks for the advice,
-dp

0
dpeterson1 (10)
3/6/2007 2:37:54 PM
>> Are you using LockWindowUpdate anywhere?

>Yes actually; but those calls were added yesterday and we've been
>having this problem for a long time. Furthermore, Lock/
>UnlockWindowUpdate (MFC) may never even occur during a typical run, it
>is just a hack to prevent 3rd party library from redrawing for each
>individual option being set when a bunch of options are being set
>altogether.

I'd recommend you eliminate it - it's often the cause of what you're
seeing and it's not intended for general use. Is it possible that some
library code is using it?

Dave
0
davidl7375 (2060)
3/6/2007 5:08:17 PM
On Mar 6, 12:08 pm, David Lowndes <Dav...@example.invalid> wrote:
> >> Are you using LockWindowUpdate anywhere?
> >Yes actually; but those calls were added yesterday and we've been
> >having this problem for a long time. Furthermore, Lock/
> >UnlockWindowUpdate (MFC) may never even occur during a typical run, it
> >is just a hack to prevent 3rd party library from redrawing for each
> >individual option being set when a bunch of options are being set
> >altogether.
>
> I'd recommend you eliminate it - it's often the cause of what you're
> seeing and it's not intended for general use. Is it possible that some
> library code is using it?
>
> Dave


Removed the LockWindowUpdate calls because you are right:  it does
cause a global repaint.

Unfortunately, this still does not account for virtually all of the
repaints.. As it turns out we were given the source code for the 3rd
party lib we are using, and alas it has NO calls to LockWindowUpdate,
NO ::InvalidateRect/Rgn(NULL, ...), and NO ::RedrawWindow(NULL, ...).

I have already established that our controls are not recieving
WM_SIZE, WM_MOVE, or WM_SETTINGCHANGE at the time of repaint. The only
thing that I can determine for certain is that both WM_ERASEBKGND and
WM_PAINT are being broadcast to every window on the system. Use of Spy+
+ confirms this.

Is there some crazy window or class style that can cause issues like
this?  Or perhaps a certain number of queued paint messages (or other
messages)?  Running out of ideas of things to check into...

-Drew

0
dpeterson1 (10)
3/7/2007 2:22:39 PM
>Removed the LockWindowUpdate calls because you are right:  it does
>cause a global repaint.

OK, 1 down then :)

>Unfortunately, this still does not account for virtually all of the
>repaints.. As it turns out we were given the source code for the 3rd
>party lib we are using, and alas it has NO calls to LockWindowUpdate,
>NO ::InvalidateRect/Rgn(NULL, ...), and NO ::RedrawWindow(NULL, ...).

Have you rebuilt the library from the source to be sure the version
you use is what the source code is?

>I have already established that our controls are not recieving
>WM_SIZE, WM_MOVE, or WM_SETTINGCHANGE at the time of repaint. The only
>thing that I can determine for certain is that both WM_ERASEBKGND and
>WM_PAINT are being broadcast to every window on the system. Use of Spy+
>+ confirms this.
>
>Is there some crazy window or class style that can cause issues like
>this?  Or perhaps a certain number of queued paint messages (or other
>messages)?  Running out of ideas of things to check into...

I can't think of anything else obvious either.

Dave
0
davidl7375 (2060)
3/7/2007 5:49:57 PM
Reply:

Similar Artilces:

Microsoft Word issue
My wife is a public HS teacher. She writes classroom material and exams in Word (Office 2003) and we have encountered a unique problem. She creates a word document of text with photos in the document (Insert / picture / from file)(the file is a .JPG file on her computer). Then she goes to print it on an HP Photosmart printer on my computer, over the network. The document prints .... but the picture is blank. Just white space where it should be, no picture. We found a workaround: Print to Adobe Acrobat PDF file (her computer has full version Acrobat installed). The pho...

SBS 2008 migration
I have started a migration from sbs 2003 to sbs 2008 premium. I have done the basic load (everything up to starting the migration wizards on the new server) so far and had one installation issue. The issue was that I could not download updates. When I try to run the CTIW it errors. Says that it cannot connect to the internet. It cannot grab my router and make any changes (old router, not upnp). However, my router is working fine with the 2003 server. So, basically, no one on my network can connect to the internet and/or the old exchange server. The new server cannot con...

Exchange system manager
I have upgraded to exchange 2003 and use a email redirector on a seperate server for mobile device users to receive email. This redirector server has an older version of the exchange system manager. I nned to upgrade this to match the mapi32 profile. I have tried to use the exchange cd and install the support tools but this will only let me install tools for exchange 5.5 How do I upgrade the system manager on a win 2k server to work with win 2k3 exchange/server? Thanks for your efforts!!! When you stick in the E2K3 cd, under the component selection, under System Tools, choose R...

CRM Security issue with Administrator account
I am unable to add users in the CRM Development Manager. I try to create new users in the wizard, the users are listed, but after selecting the users, a warning pops up telling me I do not have "sufficient security priveleges" to add users. This is a problem because I have logged on as the Administrator. Any help??? I am willing to change Admin's security or create a new Admin.... Does the administrator have a valid CRM license? Mike "Douglas Hahn" <dhahn@digitaldim.com> wrote in message news:2af201c3e130$efd9e420$a401280a@phx.gbl... > I am unable...

Sorting Issue (Mixde Fields)
I have an issue where I need to sort a worksheet based on a field (Bin Location)that is sorting as seen below... 1A1 1A20 1A21 1A22 1A3 1A4 How can I get Excel to sort it the following way... 1A1 1A3 1A4 1A20 1A21 1A22 Please help.... I need to get this figured out today. I appreciate any responses. Thanks, Jonathan G. One way: add a column showing the length of the column you want to sort, then sort using the new column then the "real" column. "Jonathan G." wrote: > I have an issue where I need to sort a worksheet based on a field (Bin > Location)that is s...

CRM 4.0 Activities Flaw/Issue
After upgrading from CRM 3 to 4 about 1 month ago, a sales rep pointed out an issue with Activites that isn't working as it should (or would think). In CRM 3, if you selected the Due Today option, it would list only activities due today. No overdue items. In CRM 4, if you select the Due Today option, it shows all activities due Today AND overdue. Basically, it's broken and useless with no Today option. In CRM 3, if you selected the Due Overdue option, it would list activites that are overdue. In CRM 4, if you selecte the Due Overdue option, it shows all activities due Today AND ove...

make query from to 64 bit system
I have a application need to be compile for 64 bit system. how can i read data from vb.net 2005. hi Jennifer, On 09.12.2009 17:36, Jennifer wrote: > I have a application need to be compile for 64 bit system. how can i read > data from vb.net 2005. First of all, I don't see the point why you're asking this question in an Access newsgroups. Further more, you should really be more spefific... mfG --> stefan <-- ...

Boot-start of system driver(s) failed to load
My event log keeps showing error 7026, The following boot-start or system start driver(s) failed to load ftsata2. Could someone please help me with this? ...

Server-Wide Auto-Reply / Address Change Notice
We are in the process of changing domains as far as email/web addresses are concerned and I wonder if it would be possible to have Exchange reply for each user with a message stating something like, "This is an automated reply letting you know that the email address for User Smith is now usmith@fakedomain.org." I realize that each user could create a rule in Outlook... but we would need the rules to apply for a long period of time and that could be very annoying for senders... getting hit with constant auto-replies. Even if it would be possible for a user to create a rule th...

shared workbook issue
Hello All - I am using Excel 2007 and have a shared workbook that is also password protected. One user of the workbook attempted to save changes and received an error message that reads: "Caution: You are attempting to save a shared workbook that is also protected with a password. Portions of the file, including the change history, will not be encrypted. To help ensure the security of your file, unshare the workbook or delete the change history from the document. Do you want to save this file?" I would like to keep this as a shared workbook, so I attempted to delete t...

Exchange 2003 OWA issue w/embedded URLs
I'm running Exchange 2003 in a front-end/back-end configuration, and for the most part OWA works just fine. I have IIS configured so that users don't need to type in the domain name when they login, and that works. However if a user clicks a URL in a message, the authentication box pops up, asking them to re-authenticate. The box will NOT accept the username and password combination unless the user specifies domain/username. I guess there are two issues here, one why is it even prompting for re-authentication, and two why won't it accept the "normal" combination of usern...

System.Web.Services.Protocols.SoapException
Has anyone tried the Samples that come with the Webservices install? Has anyone else received this error with the Samples or does anyone know what is causing it? "System.Web.Services.Protocols.SoapException: Server was unable to process request. ---> An exception occurred that the exception subsystem was unable to log. Consult your System Administrator.\r\n at CustomerUpdate.WebServiceManager.GetAllCompanies() in C:\\Program Files\\Microsoft Dynamics\\GPWebServicesSDK\\v9\\Samples\\UpdateCustomers\\CustomerUpdate\\WebServiceManager.cs:line 108\r\n at CustomerUpdate.Custom...

Weird issue with Calendar
I have one user that you can send email to fine, but when you send her a meeting appointment via outlook to her exchange GAL name she receives it fine but you receive a system admin message that a completely different end user is not a valid mailbox. Why would a calendar request be sent to her and a non-related ex employee? I checked her mailbox to be sure she didn't have a shared calendar, a delivery forward would effect more than just her calendar items so it can not be that. What would cause just those to be duplicated? On Wed, 13 Jul 2005 05:27:14 -0700, bishop <bishop@dis...

DPM 2010 RC
BUG REPRO: When installing Agents using the Wizard, if any of the selected target systems are offline the Wizard Freezes, then reports it cannot access the systems and provide a listing of the systems it cannot Access. Once the error is recognized (click on 'OK') the wizard Halts and does not go forward. Issues: 1. Selected Systems must all be online or Wizard fails to install online systems. Instead the Admin must document the systems it reported were offline, and then go back in the wizard and deselect the systems that are offline. Expected Result: Expect t...

Undeliverable messages from System Administrator
I have Outlook 2002 setup with an Imap account and an LDAP directory server. There are two .pst files - one for the local personal folders named outlook.pst (including default Inbox, contacts, sent messages, calendar etc) and another one for the imap account named imapaccount.pst that is basically a cache of messages on the actual server. Everything seems to be working fine except when a message is sent to an invalid account in the LDAP directory. I get a message from System Administrator in the Inbox of my Personal Folders (not the Inbox of my imap account folder that I monitor) with subject ...

issue with outlook hanging while downloading large email
I have outlook 2003 on XP Pro set up in cache Exchange mode configurated to download only the headers (I receive a lot of junk mail that I usually delete before downloading them) Since a few weeks I have the following issues 1) After downloading the header of unread emails if I select an email header(single click) then outlook immediately starts to download the corresponding email which not what I want and is not the previous behavior. 2) When a large email is downloaded then the whole outlook hangs until the download is complete. In the past I was able to continue working with ...

Syncing Issues
I am hoping someone can help me. I have a shared workbook that is used by four users. Their updates are uploading to the shared folder and when I sync their updates are saved on my machine. However, when I sync, my updates will not upload and are not available to other users. Does anyone have any suggestions on how to solve this problem? I have been unable to find a suggested resolution. Thank you! -------- Original-Nachricht -------- > I am hoping someone can help me. I have a shared workbook that is used by > four users. Their updates are uploading to the shar...

is Retail Management System(RMS) been used at cafeterias?
Is Ms Retail Management System been used at cafeterias? It might work in a small operation. But is it the right fit? Not in my opinion. Other software is more cafe' friendly and made for the task. If you have a small cafe, in a retail store you might consider it, if your menu does not need to print on remote kitchen printers, and your using RMS for retail. Other wise look at Dinerware perhaps or software designed for restaurants. mt "D. Reveron" <D. Reveron@discussions.microsoft.com> wrote in message news:9D79643B-B9BF-4DD2-96F2-B49D5BCFD5C7@microsoft.com... ...

Microsoft Excel 2007 to Mac Excel 2008 Issue regarding Macros
I have created worksheets on my PC using MS Excel 2007. I transfered them to a Mac user and when open the excel worksheet on his computer it tells me &quot;Excel 2008 for Mac can't run the Macros&quot; <br><br>Can someone maybe please help me to a way around this ???? Is there a version that does support macros ? Or...can the macros be re-created &amp; run ? > Is there a version that does support macros ? Or...can the macros be re-created &amp; run ? <br><br>Mac Excel 2004. ...

CRM Outlook issue !
CRM directory in Outlook closed by accident, not able to reopen ! By accident i closed the CRM entry in my Outlook 2003. Can't find how to reconnect. Tip is highly appreciated. regards erdona In Outlook select Tools/Email Accounts and select the appropriate account. Click Modify and then Add a new Personal Storage File. The next dialog lets you choose the file format, simply accept the default. Now a File Open dialog is displayed. Select the CRM pst file and you should have added it back. -- Michael H�hne, Microsoft Dynamics CRM MVP Web: http://www.stunnware.com/crm2 Feed: http://...

I am having a repaint problem with a child dialog
I've create a dialog window which is member of the CView class, I have then Created a second dialog window which is a Child of the first dialog. On the OnDraw method of the CView class I position the first Dialog relative to the main window using MoveWindow and position the second dialog to somewhere on the first dialog (I have also tried SetWindowPos). I then draw something onto the second dialog. What happens is the dialog box appears but the drawing does not, it only appears if you drag something across it or move it off the screen and back again. When you re-size the window ...

CWinThread switching issues
Hi, I'm createing a user interface CWinThread and trying to switch to it after it is started. But the window never showed up. Do I have to do something like changing the Z- order of the mainframe of the current thread before switching to the new CWinThread? If yes, how? Thanks, Vincent Hi after creating your window, just use yourWindow->ShowWindow(SW_SHOW); Mat "Scott McPhillips [MVP]" <scottmcp@mvps.org.nowhere> a �crit dans le message de news:uJ0lBq2lDHA.644@TK2MSFTNGP11.phx.gbl... > Vincent Yu wrote: > > > Hi, I'm createing a user interface CW...

Strange Issues with Read Receipts Bouncing (Need expert help)
Hi, Currently migrating a company from NT 4 to Windows Server 2003, including an upgrade from Exchange 5.5 to Exchange 2003. The excistingDNS name space for Dns and mail is user@comany.com (old domain)The Dns name space for Dns and mail on the new Domain and AD Server and Exchange is user@company.local. The Dns namespace @company.com is registered on Internet but @company.local is purely for internal addresssing, We are busy with the Exchange Migration. We have setup custom contacts on Exchange 2003 viewable in address book for all users on 5.5 using user@company.com,also with an ad...

System Volume Information
Hello , Could someone tell me how to access " System Volume Information " ? TIA , D. xp sp3 i.e. 7 o.e. 6 You have to use the security tab to add your user name to those allowed access. Read this: [How to gain access to the System Volume Information folder - Microsoft] http://support.microsoft.com/kb/309531 "D." <wdstk@sover.net> wrote in message news:e5Wr3oCrKHA.3408@TK2MSFTNGP06.phx.gbl... > Hello , > Could someone tell me how to > access " System Volume Informatio...

Exchange 2000 OWA issue
Group, I have a problem with individuals that are on an old Exchange 2000/Windows 2000 Server. (The servers are patched to the latest) The issue is that when they go out to OWA and click on reply or forward to a message, the message area is gray. They are using IE and it only seems to affect users on Exchange 2000. (2003 works fine) However, when a user gets on a Mac and uses Safari, it works fine. Any Ideas? Thanks S http://support.microsoft.com/kb/291129/en-us Other suggestions are available by searching the Microsoft KB for the words "OWA reply forward". -- Ed Crowley MV...