First thing that I'm noticeing here is that you are not useing the while ( LoopGDK ( ) ) which COULD ( not 100% on this ) prevent your loop from affecting the window. Try moving your loop into a while ( LoopGDK ( ) ). Also if you do this than you need to add a break; statement after your do loop to break from the while ( LoopGDK ( ) ) or your loop will be initiated in definately.
Furthermore there is no dbSync() in your code either, dbSync() updates the display.
I recomend creating a new project for a 2d game and reading the comments in the source it gives you ( you can delete the project afterwords ). This will give you an explination of dbSyncOn(), dbSyncRate(), dbSync() and while ( LoopGDK ( ) ). In your case however, I wouldn't put a dbSync() at the end of the while ( LoopGDK ( ) ) only at the end of your do loop because if you put it in the GDK loop it will never update ( until you change the value of rerun from 1 but without visuals it may be difficult for you to tell that it is being changed )
Last time I gave you a copy of your source with corrections but I think you would benefit more from reading this and the comments in the 2d project I suggested you create.
P.S. I realized I told you about the code button but I find it is easier to type out the tags:
[c0de] /* blah blah */ [/c0de] use o instead of zero and it will display your code the same as my previous post.
P.P.S. I copied the code here and made it work, One thing that is needed is that even though I believe it is considered a bad habbit, in your case you need to add a dbSync() after every dbInput() call or the screen will not update to display the next message ( or the user's input ) Also, there is no protective measure against invalid inputs ( ie numbers within the 0-255 range or at the end when you ask for a 1 or 2. Other than that if the purpose of this program is to allow a user to input values to use a trial / error method to obtaining the rgb values of a desired color than this program is perfect ( assumeing the user inputs correct values and understands the reprocussions of not doing so )
I will put a copy of my completed source for you but PLEASE BE AWARE that you need to put for the effort to learn the gdk and c++, We will not write all your prgrams for you.
use the information contained in <darkGDK directory>/include ( .h files include all the commands that darkGDK has to offer ) as well as referense sites such as cplusplus.com
#include "DarkGDK.h"
void DarkGDK()
{
dbSyncOn();
dbSyncRate( 60 );
int rerun;
while ( LoopGDK() )
{
do
{
DWORD white = dbRGB (255,255,255);
DWORD black = dbRGB (0,0,0);
dbCLS (white);
dbInk (black, white);
dbPrint ("Enter red component [0-255]: ");
int red = atoi( dbInput() );
dbSync();
dbPrint ("Enter green component [0-255]: ");
int green = atoi( dbInput() );
dbPrint ("Enter blue component [0-255]: ");
int blue = atoi( dbInput() );
dbSync();
DWORD color = dbRGB (red, green, blue);
dbInk (color, white);
dbBox (270, 190, 370, 290);
dbInk (black, white);
dbPrint ("[1] Color [2] Quit: ");
rerun = atoi( dbInput() );
dbSync();
}while (rerun == 1);
break;
}
}
//end DarkGDK()
Now just another quick tip, This code is functional; however, I suggest trying to pick up good codeing habbits to make your code more understandable. Add Comments up the Wazoo, learn to use tabs, that sort of thing. One important note on this subject is not everyone is alike.
( The download contains a version that incpororates the protective measures I mentioned as well as one way you could control the flow of your program. The version actualy removes your do {} ( while rerun == 1 ) all together, check it out )
EYE R T3H +ick +ack +oe mester