Hardware 3D (C++ DirectX Graphics) Tutorial 2
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.