Thank you very much of Microsoft:
: https://docs.microsoft.com/en-us/previous-versions/dd743680(v=vs.85)
// Project1.cpp : Defines the entry point for the application. // #include "framework.h" #include "Project1.h" #include//#include #pragma comment(lib, "winmm.lib" ) #define MAX_LOADSTRING 100 ... LRESULT CALLBACK WndProc(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam) { switch (message) { case WM_COMMAND: { int wmId = LOWORD(wParam); // Parse the menu selections: switch (wmId) { case ID_SOUNDS_SOUNDSWAVE: // SOUND_SYSTEM_WARNING PlaySound(TEXT("recycle.wav"), NULL, SND_FILENAME); break; case IDM_ABOUT: DialogBox(hInst, MAKEINTRESOURCE(IDD_ABOUTBOX), hWnd, About); break; case IDM_EXIT: DestroyWindow(hWnd); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } } break; case WM_PAINT: { PAINTSTRUCT ps; HDC hdc = BeginPaint(hWnd, &ps); // TODO: Add any drawing code that uses hdc here... EndPaint(hWnd, &ps); } break; case WM_DESTROY: PostQuitMessage(0); break; default: return DefWindowProc(hWnd, message, wParam, lParam); } return 0; }