gotoxy(x, y); function

This is a discussion on gotoxy(x, y); function within the Windows Programming forums, part of the Platform Specific Boards category; How do you do the function gotoxy(x, y); In windows programming? I know how to in dos but it never ...

  1. #1
    Flash Animator, OF DOOOOM bluehead's Avatar
    Join Date
    Nov 2001
    Posts
    269

    gotoxy(x, y); function

    How do you do the function

    gotoxy(x, y);


    In windows programming?

    I know how to in dos but it never works in windows.
    Please no links unless your REALLY sure it will help and if your gonna tell me please keep it simple.

    Ok thnx
    Code:
    #if _emo
      #define stereo_type_i_dislike
    #endif

  2. #2
    Registered User
    Join Date
    Nov 2001
    Posts
    162
    I'm not an expert on the Windows API, but I don't think that function will even work in Windows apps. In windows, when you want to position something you use pixels to measure it, such as when you create a window, four of the arguments are window width, height, location left of the screen, and location up-down the screen. I can't think of any reason to use gotoxy in Windows.

  3. #3
    Flash Animator, OF DOOOOM bluehead's Avatar
    Join Date
    Nov 2001
    Posts
    269
    .............
    Code:
    #if _emo
      #define stereo_type_i_dislike
    #endif

  4. #4
    Super Moderator VirtualAce's Avatar
    Join Date
    Aug 2001
    Posts
    9,596
    These are from my API reference.

    This is for the caret

    void SetCaretPos(x, y)

    int x; /* horizontal position */
    int y; /* vertical position */

    The SetCaretPos function sets the position of the caret.

    Parameter Description

    x Specifies the new x-coordinate, in client coordinates, of the caret.
    y Specifies the new y-coordinate, in client coordinates, of the caret.

    Returns

    This function does not return a value.

    Comments

    The SetCaretPos function moves the caret only if it is owned by a window in the current task. SetCaretPos moves the caret whether or not the caret is hidden.

    The caret is a shared resource. A window should not move the caret if it does not own the caret.
    And this is for the cursor:

    void SetCursorPos(x, y)

    int x; /* horizontal position */
    int y; /* vertical position */


    The SetCursorPos function sets the position, in screen coordinates, of the cursor. If the new coordinates are not within the screen rectangle set by the most recent ClipCursor function, Windows automatically adjusts the coordinates so that the cursor stays within the rectangle.

    Parameter Description

    x Specifies the new x-coordinate, in screen coordinates, of the cursor.
    y Specifies the new y-coordinate, in screen coordinates, of the cursor.

    Returns

    This function does not return a value.

    Comments

    The cursor is a shared resource. A window should move the cursor only when the cursor is in its client area.

  5. #5
    A Banana Yoshi's Avatar
    Join Date
    Oct 2001
    Posts
    857
    gotoxy() is a conio.h function

    Conio = Console IO
    Yoshi

  6. #6
    Flash Animator, OF DOOOOM bluehead's Avatar
    Join Date
    Nov 2001
    Posts
    269
    caret?
    Code:
    #if _emo
      #define stereo_type_i_dislike
    #endif

  7. #7
    ¡Amo fútbol!
    Join Date
    Dec 2001
    Posts
    2,136
    Shouldn't this be on the windows programming board?????

  8. #8
    Registered User
    Join Date
    Aug 2001
    Posts
    101
    - lmov

  9. #9
    Just one more wrong move. -KEN-'s Avatar
    Join Date
    Aug 2001
    Posts
    3,230
    But that's for DOS/Console...

    Anyhow, the Caret is that stupid little blinky thing when you're typing in an editbox...

    But, genius, you never told us what you wanted to do. If you want to move a window, let's say a button, you'd use MoveWindow(), if you want to create let's say an editbox at a certain spot, you'd specify the point in CreateWindow(), if you want to put your text at a certain spot, I'm going to kill you if you didn't realize it was an argument in TextOut(). SetCursorPos() and SetCaretPos() were already mentioned...so what do you want to do?

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Seg Fault in Compare Function
    By tytelizgal in forum C Programming
    Replies: 1
    Last Post: 10-25-2008, 03:06 PM
  2. Another syntax error
    By caldeira in forum C Programming
    Replies: 31
    Last Post: 09-05-2008, 01:01 AM
  3. In over my head
    By Shelnutt2 in forum C Programming
    Replies: 1
    Last Post: 07-08-2008, 06:54 PM
  4. Including lib in a lib
    By bibiteinfo in forum C++ Programming
    Replies: 0
    Last Post: 02-07-2006, 01:28 PM
  5. Question..
    By pode in forum Windows Programming
    Replies: 12
    Last Post: 12-19-2004, 06:05 PM

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21