473,387 Members | 3,781 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,387 software developers and data experts.

Windows Repaint Problem

Hi,
I hope this is the correct place to post questions about visual c++ 6.0. If not, sorry.

Anyway, the program I am working on takes messages from another computer and prints them on the screen. So, whenever a new message comes in, all the previous ones move up and the new one gets added to the bottom. Now, if the operator is scrolling up to see some previous messages, and a new one comes in, we need to let the operator know. Therefore, another smaller box pops up at the top with the message. The message still needs to be added to the bottom of the screen, but we don't want it to move while the operator is still looking at the older messages. To resolve this issue, we disabled the repaint when the other (smaller) box is present. Everything up until this point works fine.

Here is the issue. If another window is open on top of my program, then a repaint message gets sent to it by Windows, because of the other window. Therefore, we end up with a half refreshed screen and the lines of text will not line up.

This must be a common problem, but I can't seem to find an answer anywhere. Does anybody have any suggestions?

Any and all help is very much appreciated!

Thanks!
Feb 25 '08 #1
4 3013
weaknessforcats
9,208 Expert Mod 8TB
The smaller box should add the message to the bottom of the larger box on exit.

You should be able to invalidate and repaint at that time.
Feb 25 '08 #2
The problem is that Windows is forcing the refresh when the new window pops up. So if we don't refresh the screen, then when the window is moved, we will see white.
Feb 25 '08 #3
weaknessforcats
9,208 Expert Mod 8TB
In that case is your smaller box coded "always on top" ?
Feb 25 '08 #4
Yes, it is.

Thanks for helping!
Feb 25 '08 #5

Sign in to post your reply or Sign up for a free account.

Similar topics

11
by: Ike | last post by:
I changing the size of frames dynamically in a page (I am restricted in that I cannot perform a reload of the content of any of the frames). In MSIE, when I resize the frames, thinks repaint...
4
by: dbcuser | last post by:
Hi, I have a small windows form. This has 2 labels and a button. When a user presses a button, I copy a large file. Nowwhen the copy is going on, if I switch windows, my main window becomes...
1
by: Robert Clark | last post by:
This a pocket pc/smartphone questions mainly, but i thought i'd ask the question in the C# newsgroup. I have a form which i use to display information from a web service. From this form i open...
7
by: Paul | last post by:
I have a VB.NET form with a DataGrid. When I toggle to Excel (for example) and then back to my application the repaint of the DataGrid is really slow. You can see the repainting happening. When...
11
by: Ajith Menon | last post by:
I have created a windows application in which the form needs to be resized on the MouseMove event. The windows resize function takes a lot of CPU cycles. And as the resize function is called on the...
3
by: Ben | last post by:
Hi We have a windows form that takes a while to run a routine. During this we have created a information label, updating the user on the progress but: a) The changes on the label are not...
4
by: thesti | last post by:
Hi, i have problem with a JPanel in my JInternalFrame. it's like a maze game. after the game finished, i want to display game's statistic in the same panel i draw the tiles of the maze. but...
0
by: 123456mmmmmm | last post by:
Hi, I have a problem with Repaint my control. At first my control Create correctly. But with every changes like move scroll or anythings else my contrlo will be repaint. How can I avoid repainting...
0
by: milkay | last post by:
<I have code that uses 2 images> the program creates a window and then when u press play, it removes all components in the container. then, i add a NewPanel object. i add mouse listeners and all...
0
by: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.