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
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
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.
.............
Code:#if _emo #define stereo_type_i_dislike #endif
These are from my API reference.
This is for the caret
And this is for the cursor: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.
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.
caret?
Code:#if _emo #define stereo_type_i_dislike #endif
Shouldn't this be on the windows programming board?????
Read the FAQ: http://www.cprogramming.com/boardfaq.html#various
- lmov
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?