Category : console-application

I’m trying to play an mp3 file from a win32 C++ console application. From what I’ve read online, mciSendString is the API I’m looking for, and I expected the following to work but it doesn’t. #include <cstdio> #include <array> #define WIN32_LEAN_AND_MEAN #include <windows.h> #include <mmsystem.h> using namespace std; #pragma comment(lib, "Winmm.lib") int main() { std::array<char, ..

Read more

I’m writing some win32 application, like this: int WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) { MessageBox(NULL, L"Access is denied", L"Error", MB_ICONERROR | MB_OK); return 0; } When I compile, the complier says two errors and one warning: C28251 Inconsistent annotation for ‘WinMain’: This instance has no annotations. See C:program flies(x86)windows kitsinclude.0.0.19041.0umwinbase.h(1006) LNK2019 ..

Read more