I am using mcisendstring in my code, and was quite happy to find that it was easy to implement.
Is there a way to use a variable as myFile.Code:mciSendString("open myFile type mpegvideo alias myFile", NULL, 0, 0); mciSendString("play myFile", NULL, 0, 0);
If i use a string it errors this:Code:string myFile; mciSendString("open " + myFile + " type mpegvideo alias myFile", NULL, 0, 0); mciSendString("play myFile", NULL, 0, 0);
if i use char*:Code:49 C:\Documents and Settings\user\My Documents\SharpDevelop Projects\c++\winapi\main2.cpp cannot convert `std::basic_string<char, std::char_traits<char>, std::allocator<char> >' to `const CHAR*' for argument `1' to `MCIERROR mciSendStringA(const CHAR*, CHAR*, UINT, HWND__*)'
Code:49 C:\Documents and Settings\user\My Documents\SharpDevelop Projects\c++\winapi\main2.cpp invalid operands of types `char*' and `const char[100]' to binary `operator+'




Reply With Quote