Thread: Possibilities? Inquiring

  1. #1
    Registered User
    Join Date
    Mar 2011
    Posts
    3

    Unhappy Possibilities? Inquiring

    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.

  2. #2
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    733
    PlaySound() is an ugly way to play sounds for lazy programmers.

    Windows Multimedia (Windows)

    EDIT:

    Everything is possible including changing of console's background, even though it misses the point of consoles. If you want to have a graphical console, create your own GUI.
    Last edited by kmdv; 03-27-2011 at 03:57 AM.

  3. #3
    Registered User
    Join Date
    Mar 2011
    Posts
    3
    I still don't know how to create my own GUI. So how do I play sounds without using PlaySound() and how do I change the background? Sorry kinda of noobish here, I don't even know how to use classes.

  4. #4
    Registered User
    Join Date
    Aug 2010
    Location
    Poland
    Posts
    733
    There is no trivial way to change background of console, but it certainly would be possible somehow. If you want nice interface - start learning GUI. There are many free libraries out of there.

    And did you bother to check the link I gave you? Google is your friend.

  5. #5
    Registered User
    Join Date
    Mar 2011
    Posts
    3
    Yes I checked the links but I couldn't understand anything @_@.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Console Window Possibilities.....
    By dac in forum C++ Programming
    Replies: 3
    Last Post: 10-22-2006, 05:01 AM
  2. Help with AI possibilities
    By Syneris in forum General AI Programming
    Replies: 2
    Last Post: 01-01-2006, 02:52 AM
  3. N possibilities
    By vasanth in forum C++ Programming
    Replies: 6
    Last Post: 04-08-2002, 09:42 PM
  4. Inquiring
    By MethodMan in forum Linux Programming
    Replies: 1
    Last Post: 03-27-2002, 01:15 AM
  5. Regarding Job Possibilities as a C/C++ programmer on a Linux Platform
    By pritesh in forum A Brief History of Cprogramming.com
    Replies: 3
    Last Post: 01-22-2002, 09:26 AM