Go Premium for a chance to win a PS4. Enter to Win

x
?
Solved

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

Posted on 2004-04-04
5
Medium Priority
?
850 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 1200 total points
ID: 10754020
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
ID: 10754155
Are you using XWindows?
Please give a little more details on your developement environment.
0
 

Author Comment

by:mwong1216
ID: 10754767
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 800 total points
ID: 10755939
Use the curses library - see http://docs.sun.com/db/doc/816-0215
0
 
LVL 17

Expert Comment

by:rstaveley
ID: 10755940
The Microsoft links are Windows-specific
0

Featured Post

Independent Software Vendors: We Want Your Opinion

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

C++ Properties One feature missing from standard C++ that you will find in many other Object Oriented Programming languages is something called a Property (http://www.experts-exchange.com/Programming/Languages/CPP/A_3912-Object-Properties-in-C.ht…
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 learn how to use the return statement in functions in C++. The video will also teach the user how to pass data to a function and have the function return data back for further processing.
Suggested Courses

885 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