Learn to program Tic Tac Toe Game in Visual C++ on Windows
4.5 (248 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
10,885 students enrolled
Wishlisted Wishlist

Please confirm that you want to add Learn to program Tic Tac Toe Game in Visual C++ on Windows to your Wishlist.

Add to Wishlist

Learn to program Tic Tac Toe Game in Visual C++ on Windows

Build a complete Tic Tac Toe Game as Windows application with Visual studio 2015 / Visual C++ and Windows API
4.5 (248 ratings)
Instead of using a simple lifetime average, Udemy calculates a course's star rating by considering a number of different factors such as the number of ratings, the age of ratings, and the likelihood of fraudulent ratings.
10,885 students enrolled
Last updated 2/2016
English
Price: Free
Includes:
  • 3 hours on-demand video
  • 1 Supplemental Resource
  • Full lifetime access
  • Access on mobile and TV
  • Certificate of Completion
What Will I Learn?
  • Learn the basic concepts, tools and functions you need to build a complete Tic Tac Toe game with Visual C++ on Windows
  • Build a fully functional Tic Tac To Game as a Windows Application in C++
  • Create Native Windows Applications with Menus, Messages, Text and Icons
View Curriculum
Requirements
  • Installation of Visual Studio 2015 Community Edition (Free)
  • Understanding of Windows environment and applications
  • Basic knowledge of C/C++ like writing functions, if conditions and loops
  • Familiarity with C/C++ structures and pointers
Description

LEARN HOW TO QUICKLY BUILD A TIC-TAC-TOE GAME ON WINDOWS USING VISUAL C++

Do you want to learn how to build Windows applications using C++ and Windows API? Do you want to build a native Windows application in C++ and have it run on any version of Windows including Windows 7, Windows 8, Windows 8.1 and Windows 10?

Do you want to learn some cool techniques for handling arrays in C/C++? Are you curious to learn what it takes to build a game with Visual C++ on Windows?

If you say yes to any of these questions, then you should consider taking this course today!

WHAT YOU ARE GOING TO LEARN:

  • The basic concepts, tools and functions you need to build a complete Tic Tac Toe game with Visual C++ on Windows
  • The building blocks of a Windows GUI application including Windows, Menus, Texts, Shapes and Icons
  • How to prompt the user for messages and how to use MessageBox API
  • What is GDI and how to use it to draw texts, shapes and icons
  • How to handle Windows messages and how to center elements inside your window
  • And more tips and tricks of the trade!

This course is 100% free, so there is nothing to lose! I made my best efforts to provide high quality content and to make this both useful and fun to watch.

Let’s get started today! Enroll now!

WHAT'S IN THE COURSE?

  • Over 15 lectures and 3 hours of video content
  • Code Tic-Tac-Toe in C/C++ on Windows
  • Understand how to write efficient C++ for Windows
  • Learn how Windows applications work
  • Understand how painting works on Windows and how to utilize it for your apps
  • Build a complete tic-tac-toe game by following this course
  • Learn how to add menus, messages and how to draw inside your application with GDI

COURSE REQUIREMENTS:

  • Basic knowledge of C/C++ like loops, functions, variables and if conditions
  • Basic understanding of pointers and structs in C/C++
  • Windows 7 or newer
  • Visual Studio installation – Visual Studio 2015 Community Edition (Recommended)
  • Developers who want to learn how to program on Windows with C++
  • Anyone who wants to learn how to use Visual C++ and Windows API

NOTES

 In this course I try to cover basic understanding of Windows programming as well as the functions we use. However, it requires a lot of time and effort to cover Windows programming and Windows APIs from scratch, which is outside the scope of this course.

OVER 400 STUDENTS ON FIRST DAY & OVER 1 THOUSAND STUDENTS THE FIRST WEEK!

ENROLL TODAY TO LEARN HOW TO BUILD YOUR OWN TIC-TAC-TOE!

NOTE: FULL SOURCE CODE ATTACHED TO LECTURE #15

Who is the target audience?
  • This course is a quick overview and an introduction to anyone interested in learning building Windows Applications and Programming Windows API using C/C++
  • You must have some basic knowledge of Programming in C/C++ to be able to understand the concepts mentioned here
Students Who Viewed This Course Also Viewed
Curriculum For This Course
Expand All 15 Lectures Collapse All 15 Lectures 02:59:37
+
Learn to program Tic Tac Toe in Visual C++ on Windows
15 Lectures 02:59:37

In this video we will take a quick look at the application we're going to build together during this tutorial!

I hope you enjoy it and find it useful!

Introduction
04:19

In this video I will walk you through the process to create a new Windows application using Visual Studio 2015 and briefly go over the generated code together to understand the components of the Win32 applications that we will use for our Tic Tac Toe game.

Please make sure to download and install Visual Studio Community Edition (Free) from Microsoft.

Creating a Generic Windows Application using Visual Studio
12:58

In this video we discuss some Windows API to draw the rectangle for our Tic Tac Toe game board. We also learn how to make it always centered and also learn how to prevent the user from re-sizing the window smaller than the size of the game board itself.

How to draw the game board centered inside our Window
12:25

In this lecture, we learn how to change background color of our application window and also learn different ways to slice and dice our game board into individual cells.


Slicing the game board into 3x3 individual cells
15:15

In this lecture, we learn how to detect mouse clicks by handling WM_LBUTTONDOWN message and then we learn how to write a function together in C/C++ to determine the rectangular area of the cell clicked by the user

How to handle mouse clicks and determine a cell number from 0 to 8
17:17

In this lecture we learn how to implement GetCellRect function to calculate the dimensions of a given cell at index location (0 to 8) and return that as a RECT structure

How to get the dimensions of a cell as a rectangle given its index
14:39

In this part, we continue to explore how to use solid brushes for players. We will create a red brush and a blue brush and see how we can alternate between the two using some code logic.


How to work with BRUSH objects in Windows and how to use 2 brushes for 2 players
08:15

In this lecture, we learn how to best store player moves in memory using 1-dimensional array (vector) so that we track player moves and also to redraw everything whenever we receive a WM_PAINT message

How to store player moves inside an array and repaint them during WM_PAINT
13:44

In this lecture we learn how to implement GetWinner function and learn how to display messages to the players using MessageBox and also we will learn how to efficiently manipulate arrays and avoid writing too many if conditional statements

How to determine and show if we have a winner
19:15

In this lecture, we learn how to modify resource files to add menu items. We will also learn how to prompt user for YES/NO and how to reset the game and start a new game

Working with Menus and adding New Game functionality
09:36

In this lecture, we learn how to draw out some text inside the main window using GDI and also learn about setting text foreground and background colors

Drawing text inside our window for Player 1 and Player 2 using different colors
08:27

In this part, we see how to implement a function called ShowTurn that helps us show turn messages as well as other messages in the main window as the players take turns

Showing and displaying player turns
14:10

In this lecture, we learn how to draw images using icons instead of the red & blue colors.

How to draw images instead of colors
14:53

In this part we continue to make further enhancements to the code and also learn how to highlight the three cells that contain the winning move using colors

How to highlight the winning move using color
11:10

In this lecture, I close the course with some final ideas on how to improve this further and expand on it and also I would like to hear feedback and comments for better courses and projects in the near future...

Also, please find the source code attached to this lecture and thanks for watching!

Some Ideas for further improvements and next steps
03:14
About the Instructor
Moe Mohammad El-Haj
4.5 Average rating
312 Reviews
15,275 Students
4 Courses
Senior Software Design Engineer / Freelancer / Consultant

Hi there!

My name is Mohammad and I have a degree in computer sciences and have been working as a professional software engineer since 1995. I wrote my first program in GW-BASIC when I was 14 years old and since then I knew that I wanna grow up to become a programmer as it is the love and passion of my life!

I also started teaching Visual C/C++ and Visual Basic back in 1997 and that is when I learned how much I enjoy teaching and helping others!

I lived in Seattle for 17 years to work for Microsoft so I can learn from the best in the industry!  I spent 9 years at Microsoft as a senior software engineer and then became curious to try out other companies in USA so I can keep on growing and learning...

Over 20 years of my career, I worked with many companies from startups to medium size companies like Citrix and to big companies like Microsoft. During that time, I learned so many languages and technologies from Visual Basic, C/C++, Win32, ATL, COM, Python, Java, Javascript, C# and .NET and many more. I built Windows applications, mobile applications, built some websites and built games using Unity and many other tools. I like to share my experience and help others become professional developers as well.

I mentored, lead and managed many developers in my career and successfully helped ship many products including V 1.0 products like Microsoft Office Communicator ( aka Lync or Skype for Business). When I found out about Udemy, I was immediately hooked as a student, but I also wanted to pursue my passion as an instructor as I know that I enjoy teaching and helping others and I think I can make the learning experience fun and easy :)

As of 2017, I moved to live in CA and decided to be working full-time on creating courses as well as building some cool apps and games in my free time!

Looking forward to getting to e-meet and know everyone on Udemy!

Yours,

-Mohammad.