I have a problem, first the function:
Code:
void chatLike(string stri)
{
//function intends to output with a chat like effect
...... int strLength;
strLength=stri.length();
PlaySound(TEXT("Sounds\\keyboard.wav"), NULL, SND_ASYNC | SND_LOOP);
Sleep(600);
for(int x=0 ; x<strLength ; x++)
{
cout << stri[x];
Sleep(25);
}
PlaySound(NULL, NULL, SND_LOOP);
}
Problem is: there is a delay when the sound keyboard.wav plays that forced me to use "Sleep();". Is there anyway to preload the sound files so that when called it will play immediately and how to do it? Been googling all day with no success.
also is it possible to add a background image to a console program? Is it possible to connect and access the net retrieve search and retrieve information through the net? Is font change possible? I have made a loadscreen function: is it possible to display the load screen all the while program is processing something?
sorry for asking so many questions, it's just that I really want to improve my program and its kind of frustrating to google with no avail.
here's my program so far. Vocabulary Storage.exe
any comments suggestions and criticism will do XD.