473,473 Members | 1,555 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Clearing the screen

29 New Member
I'm using ms visual c++ writing a SDI dbase program. i have a dc that creates a bunch of circles. however, if i scroll the screen the i'mages "remain" on the screen, i.e. they ghost. and they overwrite any text or anything on the screen. I was wondering if there was a way to erase those marks?

and if not, how can i gain access to the minimize and restore buttons in the upper right side of the toolbar?

thanks
Aug 7 '06 #1
4 1892
Banfa
9,065 Recognized Expert Moderator Expert
When you scroll the window someone should be calling an Invalidate function to cause the screen to redraw. 1 of the options to those functions is an erase background option. If this is not set the the new stuff is just drawn over the old.

Sounds to me like you need to set this option.
Aug 7 '06 #2
shades234
29 New Member
When you scroll the window someone should be calling an Invalidate function to cause the screen to redraw. 1 of the options to those functions is an erase background option. If this is not set the the new stuff is just drawn over the old.

Sounds to me like you need to set this option.
can you be a bit more specific?
Aug 8 '06 #3
Banfa
9,065 Recognized Expert Moderator Expert
Hmmm, the the circles are on top of the text it is because they are being drawn there, if they are underneath the text it is because they are not being erased.

If you want to redraw a piece of the screen then you call a function like

CWnd::Invalidate( BOOL bErase = TRUE );

This (ultimately) causes a WM_PAINT message to be sent to the Window andthe window to be re-drawn. If you supply this function with a bErase parameter set to FALSE then it doesn't erase what was alread in the window and you end up overwritting it with the new stuff.


On the other hand if the circles are on top then it is more likely that where you draw the circles is not taking account of the fact that the Window is scrolled and is drawing them at an absolute position on the Window so over-writting the text.
Aug 8 '06 #4
shades234
29 New Member
alright, i think i got it.

thankx
Aug 9 '06 #5

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

Similar topics

3
by: Miki Tebeka | last post by:
Hello All, I'd like to bind <CTRL+L> so that it will clear IDLE's screen (in the interactive prompt). Any pointers/suggetions? Thanks. Miki
2
by: Robin | last post by:
Ok, I have a form that on clicking of the Update button first updates the specific record in the db, then Inserts if the vMemo field is not empty. The problem that I'm having is that After...
0
by: Gary | last post by:
I have a problem with the datagrid not clearing when the datasource changes, a few fields remain on the screen and even when new data would fill those grid squares the old data remains. I wind...
1
by: raghavendra | last post by:
Hi, i am facing problem clearing screen in console application. As, in C++ we have clrscr(); Is? their any similar type of function is avaliable.. Raghavendra...
1
by: asdf | last post by:
I just started my first project where i draw lines and strings on the screen. I sucessfully drew what i needed on the screen, then realized that when it updated it just drew over the same area w/o...
2
by: Slack | last post by:
I wish to write a console text editor. Can anyone tell me how to capture the screen like Vi or Pico does? Also, I wish to draw "tabs" on the screen, is there a standard way to draw so that my...
10
by: mwt | last post by:
I'm doing some python programming for a linux terminal (just learning). When I want to completely redraw the screen, I've been using os.system("clear") This command works when using python in...
65
by: Leslie Kis-Adam | last post by:
Hi everyone! Does anyone know, if it is possible to clear the screen in ANSI C? If it is,then how? Any help would be appreciated. Laszlo Kis-Adam <dfighter_AT-NOSPAM_freemail.hu
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,...
1
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
muto222
php
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.