Difference between revisions of "Hardware 3D (C++ DirectX Graphics) Tutorial 2"
(→Video Timestamp Index) |
|||
(4 intermediate revisions by the same user not shown) | |||
Line 1: | Line 1: | ||
− | + | Registering a window class and creating our first window. Popping that MSDN cherry too. | |
== Topics Covered == | == Topics Covered == | ||
− | * | + | * Win32 Entry Point Parameters |
− | * | + | * WinAPI Calling Convention (stdcall) |
− | * | + | * Microsoft Developer Network (MSDN) |
− | * | + | * Registering Window Class |
− | + | * Creating Window Instance | |
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
− | + | ||
== WinAPI Functions - A vs. W vs. Ex Versions == | == WinAPI Functions - A vs. W vs. Ex Versions == | ||
When you type your WinAPI code, you're gonna find many versions of the same function pop up in your Intellisense bullshits. For example, if you type <code>CreateWindow</code>, you will see <code>CreateWindow</code>, <code>CreateWindowA</code>, <code>CreateWindowW</code>, <code>CreateWindowEx</code>, <code>CreateWindowExA</code>, and <code>CreateWindowExW</code>. What is with all this bullshit? | When you type your WinAPI code, you're gonna find many versions of the same function pop up in your Intellisense bullshits. For example, if you type <code>CreateWindow</code>, you will see <code>CreateWindow</code>, <code>CreateWindowA</code>, <code>CreateWindowW</code>, <code>CreateWindowEx</code>, <code>CreateWindowExA</code>, and <code>CreateWindowExW</code>. What is with all this bullshit? | ||
− | Well first of all, for most WinAPI functions there are two versions: a multibyte (ANSI) version, and a Unicode (Wide) version. That explains the A/W shit. And the functions that don't end in A/W (e.g. <code>CreateWindow</code>) are actually macros that resolve to either A or W versions depending on a preprocessor setting. So you write code that references <code>CreateWindow</code>, and then selectively target either Unicode or ANSI just by changing a single <code>#define</code>. | + | Well first of all, for most WinAPI functions there are two versions: a multibyte (ANSI) version, and a Unicode (Wide) version. That explains the A/W shit. And the functions that don't end in A/W (e.g. <code>CreateWindow</code>) are actually macros that resolve to either A or W versions depending on a preprocessor setting. So you can write code that references <code>CreateWindow</code>, and then selectively target either Unicode or ANSI just by changing a single <code>#define</code>. |
The Ex versions are extended versions of pre-existing functions. They generally have all the functionality of the original, plus a little sumpthin-sumpthin. | The Ex versions are extended versions of pre-existing functions. They generally have all the functionality of the original, plus a little sumpthin-sumpthin. | ||
== Video Timestamp Index == | == Video Timestamp Index == | ||
− | [https://youtu.be/ | + | [https://youtu.be/nQTiSLiNyk4 Tutorial 2] |
== Source Code == | == Source Code == | ||
− | * [https://github.com/planetchili/ | + | * [https://github.com/planetchili/hw3d Hardware 3D GitHub Repo] |
== See also == | == See also == | ||
* [[Hardware 3D (C++ DirectX Graphics) Tutorial 3|Next in series (Tutorial 3)]] | * [[Hardware 3D (C++ DirectX Graphics) Tutorial 3|Next in series (Tutorial 3)]] | ||
* [[Hardware 3D Series (C++ DirectX Graphics)]] | * [[Hardware 3D Series (C++ DirectX Graphics)]] | ||
+ | * [https://www.patreon.com/planetchili Planet Chili Patreon] |
Latest revision as of 01:16, 21 December 2018
Registering a window class and creating our first window. Popping that MSDN cherry too.
Contents
Topics Covered
- Win32 Entry Point Parameters
- WinAPI Calling Convention (stdcall)
- Microsoft Developer Network (MSDN)
- Registering Window Class
- Creating Window Instance
WinAPI Functions - A vs. W vs. Ex Versions
When you type your WinAPI code, you're gonna find many versions of the same function pop up in your Intellisense bullshits. For example, if you type CreateWindow
, you will see CreateWindow
, CreateWindowA
, CreateWindowW
, CreateWindowEx
, CreateWindowExA
, and CreateWindowExW
. What is with all this bullshit?
Well first of all, for most WinAPI functions there are two versions: a multibyte (ANSI) version, and a Unicode (Wide) version. That explains the A/W shit. And the functions that don't end in A/W (e.g. CreateWindow
) are actually macros that resolve to either A or W versions depending on a preprocessor setting. So you can write code that references CreateWindow
, and then selectively target either Unicode or ANSI just by changing a single #define
.
The Ex versions are extended versions of pre-existing functions. They generally have all the functionality of the original, plus a little sumpthin-sumpthin.