Académique Documents
Professionnel Documents
Culture Documents
by
Ulfah Khairiyah Luthfiyani
Hello!
I am Ulfah
I would like to tell you about MFC & OPENGL that I
learned.
Please enjoy it !
2
1
Make MFC&OpenGL
Project
Let’s start with the first step to make MFC&OPENGL program
“Here are the steps to make
MFC&OpenGL Project”
4
1. Make a new project :
a. File > New Project or
Click New Project’s
Icon on Toolbar.
b. Installed > Template
> Visual C++ >
MFC Application.
c. Type your project
name.
d. Click OK
Make sure that the
program’s name as
similar as you want,
let’s check it !
Press “Next”
Click MFC Standard as
Choose “Single Project style to
Document” as your provides a standard
Application Type if MFC application
you want that your architecture.
application can hold
only one document.
Press “Next”
Please checklist one
to support Compound
document. But if you
didn’t need it, choose
None
This is your project’s
name. Press Next
Please checklist one
to support Database.
But if you didn’t
need it, choose None
and click Next
You can choose
Advanced Features
that will be
implemented in your
program by check the
list
There are your classes
that generated in
your project. Press
Finish to begin. Have
Fun !
2
Mfcgl Window
Let’s begin your program
Understanding
your
Mfcgl window
glVertex2f(x,y); The point location is located (x, y) Type is float and 2D (x, y)
glVertex3i(x,y,z); The point location is located (x, y, z) Type is integer and 3D (x, y, z)
glVertex3f(x,y,z); The point location is located (x, y, z) Type is float and 3D (x, y, z)
glBegin(GL_TRIANGLE_FAN); Draw a triangle as an object that have more than 3 points Primitive object
Search your
1 toolbar’s ID
here
Double click
your toolbar’s Write your toolbar’s function
ID name
How to Make a Menu Bar
How to Make a Menu Bar
How to Make a Tool Bar
Choose a tools to
draw
Design your
dialog use
the Toolbox
and choose
anything
To add a new dialog, you want
right-click your mouse
and add a new one
How to Make a Dialog Window
To give a name
of your tools,
click Properties
and change the
caption.
Important!!
Write ID name and
remember it cause it will
be used to code your
program in this project
How to Make a Dialog Window
How to Make a Dialog Window
How to Make a Dialog Window
CHAPTER
10
Color and Lighting Effect
43
HEADER FILE
44
45
46
47
CPP FILE
48
CPP FILE
49
50
6
Run it !
Let’s run your program!
Thanks!
Any questions?
You can find me at:
✗ @ulfahkl (instagram)
✗ ulfahkl@gmail.com
55