Sound output by C script in WinCC.doc
《Sound output by C script in WinCC.doc》由会员分享,可在线阅读,更多相关《Sound output by C script in WinCC.doc(2页珍藏版)》请在得力文库 - 分享文档赚钱的网站上搜索。
1、Sound output by C script in WinCCTop of FormThis entry is available in the following languages: Bottom of FormEntry ID:748844Date:06/11/2002QUESTION:How can I output a sound via C script in WinCC? ANSWER:Attached is a small example. This C action is behind a button, so that you just click to the but
2、ton to produce a sound. C action: #include apdefap.hvoid OnClick(char* lpszPictureName, char* lpszObjectName, char* lpszPropertyName, UINT nFlags, int x, int y)#pragma code (Winmm.dll )VOID WINAPI PlaySoundA ( char* pszSound, char* hmode, DWORD dwflag );#pragma code()PlaySoundA(C:Winnt.400Mediatada.
3、wav,NULL,1);Requirement for this function is a sound card.Explanation of the PlaySoundA function: 1. Parameter char* pszSound:Here you specify the complete path to where your sound file (*.wav file) is located. 2. Parameter char* hmode:Here you always specify 0. 3. Parameter DWORD dwflag.SND_SYNC =
- 配套讲稿:
如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。
- 特殊限制:
部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。
- 关 键 词:
- Sound output by script in WinCC
限制150内