473,385 Members | 1,829 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,385 software developers and data experts.

Resize Form and uninitialized memory

It looks like when I make a Form resizable and/or hit the maximize button
that it shows garbage (unitialized memory) for the new portions of the form
and then fills it in with background color. It only shows it very briefly,
but it's VERY visible during this time.

This happens with re-sizable forms too. And it 'feels' like re-sizing is
'jerky'; that is, lags a bit from my actions. I turn off visiblity to the
controls on the form while beginning re-sizing to help matters, and then
make them visible again when the re-sizing ends).

I've tried updating with and without using "Paint-only" (by way of
ControlStyles::AllPaintingInWmPaint). I also use the DoubleBuffered setting
(which I use for no Graphics drawing flicker).

For context, VS C++.NET 2005 Express using clr:/pure syntax.

[==P==]
Dec 10 '05 #1
1 1165
"Peteroid" <pe************@msn.com> wrote in message
news:ex**************@TK2MSFTNGP14.phx.gbl...
It looks like when I make a Form resizable and/or hit the maximize button
that it shows garbage (unitialized memory) for the new portions of the
form and then fills it in with background color. It only shows it very
briefly, but it's VERY visible during this time.


What you are seeing is result of the low prioritization of the paint
message.

When you resize the form, a portion is marked "invalid", i.e. in need of a
paint job.

When higher priority messages (like the ones related to sizing and movement)
are removed from the queue, the invalid portions of the form ar repainted.

Try adding an OnResize() overload to your form's class and calling Refresh()
or Invalidate().

Regards,
Will

Dec 10 '05 #2

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
by: Peter Mrosek | last post by:
Hello, I have the following declaration in an header file (abbreviated version): typedef struct { unsigned char rgbBlue; unsigned char rgbGreen; unsigned char rgbRed; unsigned char...
9
by: Alex Vinokur | last post by:
--------- #include <vector> using namespace std; struct Foo { Foo (int) {} }; int main () { vector<Foo> v1;
1
by: Jim Tarrant | last post by:
Hi, When I run our application under PurifyPlus, I get lots of "UMR: Uninitialized memory read" warnings, e.g. UMR: Uninitialized memory read in std::_Tree_nod<class std::_Tmap_traits<class...
2
by: mrbrightsidestolemymoney | last post by:
Hi, I'm having a problem resizing a (very big) nested vector. It's not the most streamlined piece of code ever but I need this array to avoid having to recalculate the same quantity millions of...
7
by: heddy | last post by:
I have an array of objects. When I use Array.Resize<T>(ref Object,int Newsize); and the newsize is smaller then what the array was previously, are the resources allocated to the objects that are...
35
by: imutate | last post by:
I get a bus (or is it buss) error when I resize a vector typedef std::vector<doubledblvec; n = 127; dblvec rv; rv.resize(n); // error happens here Any clues ? I can post more info if...
17
by: toton | last post by:
Hi, I am using a vector to reserve certain amount of memory, and reuse it for new set of data, to avoid reallocation of memory. so the call is something like vector<my_datav;///the temporary...
1
by: | last post by:
I'm creating a user control where the size always needs to be divisible by three. In the resize event within the custom control I'm having no problem maintaining the height to be the same as the...
6
by: Bob Bedford | last post by:
Hi all, I've to resize uploaded images with the "imagecopyresampled" but when I've images quite large (common those days) I reach the 16mb limits of the ISP. How can I fix this ? I absolutely...
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: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
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...

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.