Solved

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

Posted on 2004-04-04
5
846 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
5 Comments
 
LVL 15

Assisted Solution

by:lakshman_ce
lakshman_ce earned 300 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 200 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

Technology Partners: 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

Suggested Solutions

Title # Comments Views Activity
PDF library for Delphi 2 149
Writing a parser for java language 4 103
C++ standard library based binary archive format 6 112
Need some help with Microsoft Visual Studio C++ 2003 5 88
In days of old, returning something by value from a function in C++ was necessarily avoided because it would, invariably, involve one or even two copies of the object being created and potentially costly calls to a copy-constructor and destructor. A…
Introduction This article is a continuation of the C/C++ Visual Studio Express debugger series. Part 1 provided a quick start guide in using the debugger. Part 2 focused on additional topics in breakpoints. As your assignments become a little more …
The goal of the tutorial is to teach the user how to use functions in C++. The video will cover how to define functions, how to call functions and how to create functions prototypes. Microsoft Visual C++ 2010 Express will be used as a text editor an…
The viewer will learn how to clear a vector as well as how to detect empty vectors in C++.

752 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