The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > High Level Programming
Google UNIX.COM


High Level Programming Post questions about C, C++, Java, SQL, and other programming languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
replace only 1st word of a line if it comes in the subsequent lines at same postion. geeko Shell Programming and Scripting 8 07-03-2008 04:24 AM
curser control ~ multi line progress bar purest Shell Programming and Scripting 4 10-29-2007 03:58 AM
How to grep at a given postion kingofprussia UNIX for Dummies Questions & Answers 3 06-12-2007 09:40 AM
Positioning curser at EOF in vi JimJim UNIX for Dummies Questions & Answers 6 12-08-2004 01:20 PM
How do you know what your current shell is? shad0w75 UNIX for Dummies Questions & Answers 4 06-13-2003 11:01 AM

Reply
 
LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 07-11-2008
Registered User
 

Join Date: Oct 2007
Posts: 4
need info on current curser postion.

Hi All,

I have written the below code to know the current curser position. The problem with this code is - it gives me window size properly but whn it comes to current curser position then it gives (0,0) as x,y co-ordinate eventhough my curser is somewhere middle on command line interface.

So could you please tell me that whats the purpose of getyx(). If it is to know current curser position then why does it always give me 0,0 as x,y co-ordinate?
////////////////////////////////////////////////////
initscr();
getmaxyx(stdscr, row, col);
getyx(stdscr, y, x);
endwin();
////////////////////////////////////////////////////

Thanks in advance
Swapnil
Reply With Quote
Google UNIX.COM
Forum Sponsor
Reply

Thread Tools
Display Modes




All times are GMT -7. The time now is 09:37 PM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited.
The UNIX and Linux Forums Content Copyright ©1993-2008 The CEP Blog All Rights Reserved -Ad Management by RedTyger Visit The Global Fact Book

Content Relevant URLs by vBSEO 3.2.0