I have just started with MFC again after being away from programming for a bit. And I've encountered exactly the same problem I had the first time I tried to write tictactoe!! The area that can be clicked is seeming smaller than the area drawn, hence clicking on the right or on the bottom of the game does nothing.

This is my OnPaint code, which has the mapmode calls where I think the problem may lie.

Code:
void TTTWin::OnPaint( )
{
	CPaintDC dc( this );

	CRect rect;
	GetClientRect( &rect );
	dc.SetMapMode( MM_ANISOTROPIC );
	dc.SetWindowExt( 300, 300 );
	dc.SetViewportExt( rect.Width( ), rect.Height( ) );

	dc.MoveTo( 100, 5 );
	dc.LineTo( 100, 295 );
	dc.MoveTo( 200, 5 );
	dc.LineTo( 200, 295 );
	dc.MoveTo( 5, 100 );
	dc.LineTo( 295, 100 );
	dc.MoveTo( 5, 200 );
	dc.LineTo( 295, 200 );

	for( int i = 0; i < 9; i++ )
	{
		switch( game.mark[ i ] )
		{
		case game.OH:
			game.drawOH( dc, game.squares[ i ] );
			break;

		case game.EX:
			game.drawEX( dc, game.squares[ i ] );
			break;

		case game.EMPTY:
			break;

		default:
			MessageBox( "Cannot draw piece", ERROR );
			break;
		}
	}
}
The TicTacToe constructore which initialises the rectangles looks like this:

Code:
TicTacToe::TicTacToe( )
{
	theApp = new TTTApp( );
	
	squares[ 0 ].SetRect( 0, 0, 100, 100 );
	squares[ 1 ].SetRect( 100, 0, 200, 100 );
	squares[ 2 ].SetRect( 200, 0, 300, 100 );
	squares[ 3 ].SetRect( 0, 100, 100, 200 );
	squares[ 4 ].SetRect( 100, 100, 200, 200 );
	squares[ 5 ].SetRect( 200, 100, 300, 200 );
	squares[ 6 ].SetRect( 0, 200, 100, 300 );
	squares[ 7 ].SetRect( 100, 200, 200, 300 );
	squares[ 8 ].SetRect( 200, 200, 300, 300 );

	for( int i = 0; i < 9; i++ )
	{
		mark[ i ] = EMPTY;
	}

	lastGo = EX;
}
Really hope to get this one explained to me, cant believe I reached exactly the same problem I had 4 years ago when I did it for the first time!!