
This is how it looks:
int y = boxY;
while( y < boxY + boxWidth )
{
int x = boxX;
while( x < boxX + boxWidth )
{
gfx.PutPixel(x,y,255,255,255);
x = x + 1;
}
y = y + 1;
}
That is the whole Square
if (kbd.RightIsPressed() )
{ boxX = boxX + 1;
}
if (kbd.LeftIsPressed() )
{ boxX = boxX - 1;
}
if (kbd.DownIsPressed() )
{ boxY = boxY + 1;
}
if ( kbd.UpIsPressed() )
{ boxY = boxY - 1;
}
That is the movement up here

if ( kbd.SpaceIsPressed() )
{
if ( boxX > boxWidth )
{
if ( boxY > boxWidth )
{
boxWidth = boxWidth - 1;
}
}
}
This was the Minimize.
Hope i helped a bit. I'm going to try make it go back to its originarly form without holding spacebar.
Game.cpp : Game::Game( HWND , etc etc etc... )
boxY( 250 ),
boxX( 350 ),
boxWidth( 100 )
Game.h : Private :
int boxX;
int boxY;
int boxWidth;
int boxHeight;
Now to fix that it should go back to its originarly state as it was in the beginning is not too hard to figure out...

(The 3 } you had in the end you add :
else
{ boxWidth = boxWidth + 1;
}
if( boxWidth > 100 )
{ boxWidth = 100;
}
which means : If not holding down spacebar to make it decrease it takes the boxWidth in the boxWidth and add with 1 pixel every time.
If BoxWidth is LARGER than 100, boxWidth equals (=) 100.
Btw I'm a new Coder , i've followed all the 9 lessons and i'm on my 10th
Chili Your an awesome helper!!

Never coded in my whole life before.
Too exhausted right now

