EDIT: I've managed to fix it. I've just added the same preprocessor definitions to my project as the ones which can be found in the demos.
Works like a charm._DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32

Works like a charm._DEBUG;_CONSOLE;_CRT_SECURE_NO_DEPRECATE;_CRT_NONSTDC_NO_DEPRECATE;WIN32