掲示板システム
ホーム
アクセス解析
カテゴリ
ログアウト
PlaySound を Windows Forms Application (.NET) で使用するには? (ID:64819)
名前
ホームページ(ブログ、Twitterなど)のURL (省略可)
本文
Form1.cpp の一番上に宣言すべきですよね? ご指摘の通り、 Form1.cpp の一番上に #include "stdafx.h" #include "Form1.h" #include <windows.h> using namespace mySomething; と、宣言した場合、(即ち、デフォルト設定に #include <windows.h> のみを追加したのみ。)同じエラーが発生し、コンパイルを完了することができません。 error C3861: 'PlaySound': identifier not found, even with argument-dependent lookup error C2065: 'SND_FILENAME' : undeclared identifier error C2065: 'SND_SYNC' : undeclared identifier error C3861: 'PlaySound': identifier not found, even with argument-dependent lookup エラーコードはPlaySound 及びそのパラメーターを認識できないと言っているので、Form.h file 上に何か宣言しなくてはいけないのでしょうか? 例えば #pragma once //ここに何か PlaySound に関する #include file 又は #using file namespace myProject { using namespace System; using namespace System::ComponentModel; using namespace System::Collections; using namespace System::Windows::Forms; using namespace System::Data; using namespace System::Drawing; //もしくはここに何か PlaySound に関する using namespace が、必要なのでしょうか? ご迷惑お掛けして、申し訳御座いません。
←解決時は質問者本人がここをチェックしてください。
更新する
戻る
掲示板システム
Copyright 2021 Takeshi Okamoto All Rights Reserved.