|
When you run this function what happens?
|
|
|
|
|
Hello ,
i would like to know how i could play a sound(wav)!Which function i must use?I tried to use the function <playsound()>!
Thanks
|
|
|
|
|
andreas_635 wrote: I tried to use the function !
I've not yet heard of that one. What all does it do? You might also give sndPlaySound() and PlaySound() a try.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Do you want to play only wav file if yes you can use of sndPlaySound
|
|
|
|
|
I am doing something like this...
void View::OnView() <br />
{ <br />
Dialog dlg();<br />
if(dlg.DoModal() == IDCANCEL)<br />
return;<br />
COIN Coin;<br />
if (dlg.m_ValCoinSwitch == " some text")<br />
Coin.lights[WFS_SIU_COINSWITCH] = ENABLE;<br />
<br />
else (dlg.m_ValCoin2Switch == "some text")<br />
Coin.lights[WFS_SIU_COINSWITCH] = DISABLE;<br />
}<br />
<code><br />
<br />
Now, what I am doing in here is "bringing the dialog with DoModal and coded like if Cancel is pressed, then it should return otherwise should run the OK". Now, I wonder what should be added before "COIN coin" so that when okay is pressed it should perform ENABLE or DISABLE whatever I chose from ComboBox.<br />
<br />
Will really appreciate help.<br />
<br />
Thanbs <br />
<br />
<div class="ForumSig">C++Prog</div>
|
|
|
|
|
celllllllll wrote: Now, I wonder what should be added before "COIN coin" so that when okay is pressed it should perform ENABLE or DISABLE...
If the if(...) condition evaluates to false, it is already doing that.
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
I got it worked..Thanks
C++Prog
|
|
|
|
|
As said by David , its done already, Is something other you want ?
|
|
|
|
|
I am using Visual C++ 6.0 MFC on Windows 2000. I have an application that automates Excel and populates the cells with data. I have another application that I need to automate Excel and I have included the excel9.h and excel9.cpp files into the project. I copied the variable declarations and the function that starts excel and gets the application object from the application that already is automating excel. Here is my problem. In the existing application the app.CreateDispatch("Excel.Application") function works fine, but in the new application this same instruction fails. Anyone have any ideas as to what is going on here?
Buck
|
|
|
|
|
first thing i always check: did you call CoInitialize in your app's InitInstance (or at least before you call any COM calls) ?
|
|
|
|
|
BuckBrown wrote: ...but in the new application this same instruction fails.
With what error(s)? The second argument to CreateDispatch() is a COleException pointer. What does its m_strSource and m_strDescription members indicate?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hi,
I want to store the location of a file in C# program, but
the file may be moved into another location. So besides using
the File System Watcher, can I store other information of the file
instead of the location, so that the shell or window can recognize
the file by the stored info and give me the new location information ?
Thanks
|
|
|
|
|
you wanted to do this in C#, so you told yourself that the C++ forum would be the best place, hum ?
ask here[^] instead.
(and please delete your post if you read this, using the "Delete" link at the bottom of it)
[edit]
you asked the C# forum first, and then asked the C++ forum for this ?!
shame on you !!!
you'd better read what is behind the "links for newbies" in my sig, they seem to apply to you perfectly.
[/edit]
|
|
|
|
|
toxcct wrote: Don't know where to start ?
Refer the Forums Guidelines and ask a friend
Great Sig, clasic!
I'd love to help, but unfortunatley I have prior commitments monitoring the length of my grass. :Andrew Bleakley:
|
|
|
|
|
i was tired of repeating always and always the same things... lol
but thanks
|
|
|
|
|
Wrong forum this is VC++ forum not C#
|
|
|
|
|
Hello,
The following is the code where I get an error
CDatabase CurrentDatabase;
CString str = "UPDATE Table1 SET ROLLNO = 45;";
CurrentDatabase.ExecuteSQL(str);
Above code gives an error
"Operation must use an updateable query"
Any ideas what went wrong with the query.The same query works in access but gives an error in VC++.
Is this the right forum to ask about it.
Thanks
Prithaa
|
|
|
|
|
Is the database opened read-only?
|
|
|
|
|
Don't you have to call CDatabase 's OpenEx() or Open() method in there someplace?
"Approved Workmen Are Not Ashamed" - 2 Timothy 2:15
"Judge not by the eye but by the heart." - Native American Proverb
|
|
|
|
|
Hello,
Thanks for the reply.
But the problem is not with Open since if it was not open, it would have opened a dialog for ODBC connection to open a database.
The error says
"The operation must use an updateable query"
The same query works with Access
Prithaa
|
|
|
|
|
prithaa wrote: The same query works with Access
How is that possible? In the code you posted there's no way the CDatabase object can know which
database to perform the query on.
If you Google the error "The operation must use an updateable query" you'll find that the most
common reason is database opened read only. You haven't shown how you open the database.
Mark
|
|
|
|
|
|
Hello,
CDatabase C;CString D="Students";
C.Open(_T(D),FALSE,TRUE,_T("ODBC"));
CRecordset R;
R.Open(dbOpenDynaset,_T("SELECT * FROM Table1"));
CString str = "UPDATE Table1 SET ROLLNO = 45";
C.ExecuteSQL(str);
R.Close();
The above is the full code.
Thanks for your reply
Prithaa
|
|
|
|
|
Hello,
Sorry to have bothered
I got my mistake.My Database was opened readonly so the query was not able to update the records
Thanks
PRithaa
|
|
|
|
|
I glad you find it
|
|
|
|