Solved

how to set console cursor position for a program running in sun machine

Posted on 2004-04-04
5
834 Views
Last Modified: 2012-08-14
hi,

we developped a p2p c++ console application running on sun machines, am wondering how to set console cursor position in the terminal we used to run the program, want to have a static manu on top and the bottom display chat room messages, of which should be dynamic. i am a beginner, so it would help alot if you would be more specific and tell me the library name and actual function to use. thanks  alot
0
Comment
Question by:mwong1216
5 Comments
 
LVL 15

Assisted Solution

by:lakshman_ce
lakshman_ce earned 300 total points
Comment Utility
You can try to use the API
SetConsoleCursorPosition

The SetConsoleCursorPosition function sets the cursor position in the specified console screen buffer.


BOOL SetConsoleCursorPosition(
  HANDLE hConsoleOutput,
  COORD dwCursorPosition
);

Declared in Wincon.h; include Windows.h

Plz refer to the following links also

http://www.experts-exchange.com/Programming/Programming_Languages/Cplusplus/Q_10171468.html
http://msdn.microsoft.com/library/default.asp?url=/library/en-us/dllproc/base/using_the_high_level_input_and_output_functions.asp

-Lakshman
0
 
LVL 30

Expert Comment

by:Axter
Comment Utility
Are you using XWindows?
Please give a little more details on your developement environment.
0
 

Author Comment

by:mwong1216
Comment Utility
using Sun Solaris 8, develop by typing code into the xemacs editor, no graphic just command lines,  nothing fancy, using terminal to compile and execute. so setting the cursor also means setting the display position for the terminal. am wondering the above metioned API works for Sun Solaris? or just for Windows? thanks alot
0
 
LVL 17

Accepted Solution

by:
rstaveley earned 200 total points
Comment Utility
Use the curses library - see http://docs.sun.com/db/doc/816-0215
0
 
LVL 17

Expert Comment

by:rstaveley
Comment Utility
The Microsoft links are Windows-specific
0

Featured Post

Highfive + Dolby Voice = No More Audio Complaints!

Poor audio quality is one of the top reasons people don’t use video conferencing. Get the crispest, clearest audio powered by Dolby Voice in every meeting. Highfive and Dolby Voice deliver the best video conferencing and audio experience for every meeting and every room.

Join & Write a Comment

This article will show you some of the more useful Standard Template Library (STL) algorithms through the use of working examples.  You will learn about how these algorithms fit into the STL architecture, how they work with STL containers, and why t…
Container Orchestration platforms empower organizations to scale their apps at an exceptional rate. This is the reason numerous innovation-driven companies are moving apps to an appropriated datacenter wide platform that empowers them to scale at a …
The viewer will learn how to pass data into a function in C++. This is one step further in using functions. Instead of only printing text onto the console, the function will be able to perform calculations with argumentents given by the user.
The viewer will be introduced to the technique of using vectors in C++. The video will cover how to define a vector, store values in the vector and retrieve data from the values stored in the vector.

772 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

12 Experts available now in Live!

Get 1:1 Help Now