Useful keyboard shortcuts
Ctrl-K-C Comment code
Ctrl-K-U Uncomment code
Ctrl-M-O Collapse all definitions
Ctrl-M-L Expand all
Ctrl-M-M Collapse / expand current section
Ctrl-D Duplicate line
Ctrl-Shf-L Delete line

Libraries to add (linker)

DX11: d3d11.lib;d3dx11.lib;d3dx10.lib;dxerr.lib;d3dcompiler.lib;legacy_stdio_definitions.lib

e.g. using pragma

// Link library dependencies
#pragma comment(lib, "d3d9.lib")
#pragma comment(lib, "winmm.lib")


#pragma once

In the C and C++ programming languages, #pragma once is a non-standard but widely supported preprocessor directive designed to cause the current source file to be included only once in a single compilation. Thus, #pragma once serves the same purpose as include guards, but with several advantages, including: less code, avoidance of name clashes, and sometimes improvement in compilation speed.


Changing a Win32 project from Windows application to console application

Replace _WINDOWS with _CONSOLE or vice versa in

   Project Properties -> C/C++ -> Preprocessor -> Preprocessor Definitions

Change from Windows (/SUBSYSTEM:WINDOWS) to Console (/SUBSYSTEM:CONSOLE) or vice versa in

   Project Properties -> Linker -> System -> SubSystem