- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
In a console window
SETTEXTPOSITION doesnt work
So how is it possible to set (and retrieve) the cursor position?
Thankx
Jim
(Our old code does it by using assembler routines to pass ansi.sys command strings - True)
SETTEXTPOSITION doesnt work
So how is it possible to set (and retrieve) the cursor position?
Thankx
Jim
(Our old code does it by using assembler routines to pass ansi.sys command strings - True)
1 솔루션
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
There are Win32 APIs for manipulating a console window and setting the position. See Console Functions In particular, SetConsoleCursorPosition. You'll need to call GetStdHandle first to get a handle to the console.
ANSI.SYS doesn't work in 32-bit Windows.
ANSI.SYS doesn't work in 32-bit Windows.
링크가 복사됨
10 응답
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Quoting - jim.cox
In a console window
SETTEXTPOSITION doesnt work
So how is it possible to set (and retrieve) the cursor position?
Thankx
Jim
(Our old code does it by using assembler routines to pass ansi.sys command strings - True)
SETTEXTPOSITION doesnt work
So how is it possible to set (and retrieve) the cursor position?
Thankx
Jim
(Our old code does it by using assembler routines to pass ansi.sys command strings - True)
Jim,
this won't work in a simple console window. Have alook at the Graphics Library Routines under the QuickWin section of the documentation to find out more about using these features. You will need to create a TextWindow instead of a console window.
Regards,
David
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Quoting - David White
Jim,
this won't work in a simple console window. Have alook at the Graphics Library Routines under the QuickWin section of the documentation to find out more about using these features. You will need to create a TextWindow instead of a console window.
Regards,
David
Thought that might be the case :(
So how do I include the Quickwin stuff properly into my program?
If in the code I
USE IFQWIN
and later
CALL SETTEXTWINDOW(1,1,24,80)
At linking I get an unresolved external for _SETTEXTWINDOW
Change the Fortran runtime libraries from debug multithreaded to debug quickwin generates a _winMain already defined error as well as _SETTEXTWINDOW and _DIR being unresolved
And adding IFQWIN.LIB to the linker's dependency list creates a whole stack of unresolved externals
(The new progam started life as an SDI code windowing application if that makes any difference)
Cheers
Jim
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
There are Win32 APIs for manipulating a console window and setting the position. See Console Functions In particular, SetConsoleCursorPosition. You'll need to call GetStdHandle first to get a handle to the console.
ANSI.SYS doesn't work in 32-bit Windows.
ANSI.SYS doesn't work in 32-bit Windows.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Quoting - Steve Lionel (Intel)
There are Win32 APIs for manipulating a console window and setting the position. See Console Functions In particular, SetConsoleCursorPosition. You'll need to call GetStdHandle first to get a handle to the console.
ANSI.SYS doesn't work in 32-bit Windows.
ANSI.SYS doesn't work in 32-bit Windows.
GetStdHandle or GetConsoleWindow? or are they the same given an AllocConsole() ?
> ANSI.SYS doesn't work in 32-bit Windows.
Well, it works fine in an XP command window - but its really really clunky - which is one reason I'm having to rewrite both the frontend and libraries for this particular baby
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
GetConsoleWindow will work. ANSI.SYS works only for 16-bit apps. We got this complaint a LOT with CVF from people moving from DOS.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Having trouble with the second paramter to the SetConsoleCursorPosition call.
According to the documentation the call looks like
BOOL WINAPI SetConsoleCursorPosition(
HANDLE hConsoleOutput,
COORD dwCursorPosition
);
where a COORD is
typedef struct _COORD { SHORT X; SHORT Y;
} COORD, *PCOORD;
I'm trying a structure that looks like
TYPE COORD
INTEGER(2) X
INTEGER(2) Y
END TYPE
TYPE (COORD) C
but I keep getting
error #6633: The type of the actual argument differs from the type of the dummy argument.
Any thoughts?
According to the documentation the call looks like
BOOL WINAPI SetConsoleCursorPosition(
HANDLE hConsoleOutput,
COORD dwCursorPosition
);
where a COORD is
typedef struct _COORD { SHORT X; SHORT Y;
} COORD, *PCOORD;
I'm trying a structure that looks like
TYPE COORD
INTEGER(2) X
INTEGER(2) Y
END TYPE
TYPE (COORD) C
but I keep getting
error #6633: The type of the actual argument differs from the type of the dummy argument.
Any thoughts?
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Here's a routine I did in CVF that sets the cursor position. Proabably pretty close to what
you'd need in IVF.
subroutine gotoxy(irow,icol)you'd need in IVF.
use dflib
use dfwin
integer fhandle
logical lstat
Type(T_COORD) wpos
fhandle = GetStdHandle(STD_OUTPUT_HANDLE)
wpos.x = icol
wpos.y = irow
lstat = SetConsoleCursorPosition(fhandle, wpos)
return
end
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
You need to use type T_COORD, not a type that "looks like" it.
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
Quoting - Steve Lionel (Intel)
You need to use type T_COORD, not a type that "looks like" it.
Thankx, that did the trick :)
Is there a good source for documentation of the ifort view of the winapi interface and the libraries?
Cheers
Jim
- 신규로 표시
- 북마크
- 구독
- 소거
- RSS 피드 구독
- 강조
- 인쇄
- 부적절한 컨텐트 신고
The sources for the modules are in the compiler's INCLUDE folder.
