Programming Forums
User Name Password Register
 

RSS Feed
FORUM INDEX | TODAY'S POSTS | UNANSWERED THREADS | ADVANCED SEARCH

Reply
 
Thread Tools Display Modes
Old Dec 2nd, 2007, 9:54 PM   #1
09jyoung
codemaniac
 
Join Date: Dec 2007
Posts: 9
Rep Power: 0 09jyoung is on a distinguished road
Question Connect four help

hello... i'm writing a C++/Win32 connect four program... its still in development... but the source can be found here[link]... i'm doing alright... except with updating the board... I used InvalidateRect(hWnd,NULL,true) to update it... the problem is that this updates the entire screen and causes it to flicker... does anyone know any better methods?
09jyoung is offline   Reply With Quote
Old Dec 2nd, 2007, 10:18 PM   #2
Jimbo
Battle Programmer
 
Jimbo's Avatar
 
Join Date: Feb 2006
Location: Bellevue, WA, USA
Posts: 747
Rep Power: 3 Jimbo is on a distinguished road
Re: Connect four help

Please don't double post your question.
__________________
<insert disclaimer here>
<insert shameless plug for Visual Studio here>
Jimbo is offline   Reply With Quote
Old Dec 28th, 2007, 11:27 AM   #3
Adak
Hobby Coder
 
Join Date: May 2006
Posts: 57
Rep Power: 0 Adak is an unknown quantity at this point
Re: Connect four help

Quote:
Originally Posted by 09jyoung View Post
hello... i'm writing a C++/Win32 connect four program... its still in development... but the source can be found here[link]... i'm doing alright... except with updating the board... I used InvalidateRect(hWnd,NULL,true) to update it... the problem is that this updates the entire screen and causes it to flicker... does anyone know any better methods?
I'm not a C++ user, but I had something similar with my chess program, in C. The problem was I was updating the entire chessboard every time a single piece was moved.

The answer to get rid of the flicker was to just update two squares on the board - the piece's from square, and the square the piece is moving to. End of annoying screen flicker.

You might be able to use InvalidateRect, as you do now, but send it the parameters of the two squares that need updating, in two calls.
Adak is offline   Reply With Quote
Reply

Bookmarks

« Previous Thread in Forum | Next Thread in Forum »

Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
mysqli connect via included file tAK PHP 4 Apr 3rd, 2007 6:40 AM
connect to a ssl-webservice with soap ken q C++ 3 May 5th, 2006 8:39 AM
using sockets to connect between ms and *nix linuxpimp20 C 8 Sep 30th, 2005 8:23 AM
Using ODBC to connect to a remote database in a C program bigi C++ 1 Mar 8th, 2005 3:19 PM
Cant connect servlet to MySQL DB BizzyC Java 0 Mar 8th, 2005 9:01 AM




DaniWeb IT Discussion Community
All times are GMT -5. The time now is 5:38 PM.

Powered by vBulletin® Version 3.7.0, Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Copyright ©2007 DaniWeb® LLC