Results 1 to 5 of 5

Thread: Api

  1. #1

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650

    Api

    Hi, i used this code, but all it does is change the cursor to arrow with hourglass:

    #include <windows.h>
    #include <iostream.h>
    #include <string.h>
    #include <dos.h>

    int main()
    {
    string command;
    date today;
    getdate(&today);
    cout<<"Terminal Activated ";
    cout<<today.da_mon<<" "<<today.da_day<<" "<<today.da_year<<"\n";
    while(command!="end")
    {
    cin>>command;
    if(command=="cursor")
    ShowCursor(FALSE);
    if(command=="show")
    ShowCursor(TRUE);
    }
    }

    ive tried passing the parameter in numbers, tried it in lowercase, someone please help.

  2. #2
    Frenzied Member
    Join Date
    Jul 2002
    Posts
    1,370
    In one sentence that we can all understand: what do you want to do? Change the cursor?

  3. #3
    Frenzied Member CyberCarsten's Avatar
    Join Date
    Sep 1999
    Location
    Aalborg Ø, Denmark
    Posts
    1,544
    I just think he wants to hide/show the cursor.

    The code you are already using should do the job...
    razor
    Software Engineer Student, Aalborg University, Denmark
    http://www.cs.auc.dk

    My email at AUC: will get a new email soon
    My website: http://www.razorsoftware.net


    Windows XP Pro/ Gentoo Linux (Laptop)
    Windows XP Pro (Home PC)

  4. #4
    Kitten CornedBee's Avatar
    Join Date
    Aug 2001
    Location
    In a microchip!
    Posts
    11,594
    No, since at the moment the app is closing the cursor is reset (I think).

    Oh, and you should use <string>, <iostream> and
    using namespace std;
    to comply with the current C++ standard.
    All the buzzt
    CornedBee

    "Writing specifications is like writing a novel. Writing code is like writing poetry."
    - Anonymous, published by Raymond Chen

    Don't PM me with your problems, I scan most of the forums daily. If you do PM me, I will not answer your question.

  5. #5

    Thread Starter
    Fanatic Member Mushroom Realm's Avatar
    Join Date
    Mar 2002
    Location
    Murrieta, California
    Posts
    650
    i just got a new compiler that supports non .h include names yesterday night.

    the app wont close till u type end, compile it, and test it

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width